published on Wednesday, Mar 18, 2026 by Impart Security
published on Wednesday, Mar 18, 2026 by Impart Security
Manage a specification.
Create Spec Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Spec(name: string, args: SpecArgs, opts?: CustomResourceOptions);@overload
def Spec(resource_name: str,
args: SpecArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Spec(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
source_file: Optional[str] = None,
learning_config: Optional[SpecLearningConfigArgs] = None,
source_hash: Optional[str] = None)func NewSpec(ctx *Context, name string, args SpecArgs, opts ...ResourceOption) (*Spec, error)public Spec(string name, SpecArgs args, CustomResourceOptions? opts = null)type: impart:Spec
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SpecArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SpecArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SpecArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SpecArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SpecArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var specResource = new Impart.Spec("specResource", new()
{
Name = "string",
SourceFile = "string",
LearningConfig = new Impart.Inputs.SpecLearningConfigArgs
{
LearningMode = "string",
IncludeQueryParams = false,
IncludeRequestBody = false,
IncludeRequestHeaders = false,
IncludeResponseBody = false,
IncludeResponseHeaders = false,
},
SourceHash = "string",
});
example, err := impart.NewSpec(ctx, "specResource", &impart.SpecArgs{
Name: pulumi.String("string"),
SourceFile: pulumi.String("string"),
LearningConfig: &impart.SpecLearningConfigArgs{
LearningMode: pulumi.String("string"),
IncludeQueryParams: pulumi.Bool(false),
IncludeRequestBody: pulumi.Bool(false),
IncludeRequestHeaders: pulumi.Bool(false),
IncludeResponseBody: pulumi.Bool(false),
IncludeResponseHeaders: pulumi.Bool(false),
},
SourceHash: pulumi.String("string"),
})
var specResource = new Spec("specResource", SpecArgs.builder()
.name("string")
.sourceFile("string")
.learningConfig(SpecLearningConfigArgs.builder()
.learningMode("string")
.includeQueryParams(false)
.includeRequestBody(false)
.includeRequestHeaders(false)
.includeResponseBody(false)
.includeResponseHeaders(false)
.build())
.sourceHash("string")
.build());
spec_resource = impart.Spec("specResource",
name="string",
source_file="string",
learning_config={
"learning_mode": "string",
"include_query_params": False,
"include_request_body": False,
"include_request_headers": False,
"include_response_body": False,
"include_response_headers": False,
},
source_hash="string")
const specResource = new impart.Spec("specResource", {
name: "string",
sourceFile: "string",
learningConfig: {
learningMode: "string",
includeQueryParams: false,
includeRequestBody: false,
includeRequestHeaders: false,
includeResponseBody: false,
includeResponseHeaders: false,
},
sourceHash: "string",
});
type: impart:Spec
properties:
learningConfig:
includeQueryParams: false
includeRequestBody: false
includeRequestHeaders: false
includeResponseBody: false
includeResponseHeaders: false
learningMode: string
name: string
sourceFile: string
sourceHash: string
Spec Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Spec resource accepts the following input properties:
- Name string
- The name for this specification.
- Source
File string - The specification file.
- Learning
Config SpecLearning Config - Configuration for spec learning.
- Source
Hash string - The specification source hash.
- Name string
- The name for this specification.
- Source
File string - The specification file.
- Learning
Config SpecLearning Config Args - Configuration for spec learning.
- Source
Hash string - The specification source hash.
- name String
- The name for this specification.
- source
File String - The specification file.
- learning
Config SpecLearning Config - Configuration for spec learning.
- source
Hash String - The specification source hash.
- name string
- The name for this specification.
- source
File string - The specification file.
- learning
Config SpecLearning Config - Configuration for spec learning.
- source
Hash string - The specification source hash.
- name str
- The name for this specification.
- source_
file str - The specification file.
- learning_
config SpecLearning Config Args - Configuration for spec learning.
- source_
hash str - The specification source hash.
- name String
- The name for this specification.
- source
File String - The specification file.
- learning
Config Property Map - Configuration for spec learning.
- source
Hash String - The specification source hash.
Outputs
All input properties are implicitly available as output properties. Additionally, the Spec resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Spec Resource
Get an existing Spec resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SpecState, opts?: CustomResourceOptions): Spec@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
learning_config: Optional[SpecLearningConfigArgs] = None,
name: Optional[str] = None,
source_file: Optional[str] = None,
source_hash: Optional[str] = None) -> Specfunc GetSpec(ctx *Context, name string, id IDInput, state *SpecState, opts ...ResourceOption) (*Spec, error)public static Spec Get(string name, Input<string> id, SpecState? state, CustomResourceOptions? opts = null)public static Spec get(String name, Output<String> id, SpecState state, CustomResourceOptions options)resources: _: type: impart:Spec get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Learning
Config SpecLearning Config - Configuration for spec learning.
- Name string
- The name for this specification.
- Source
File string - The specification file.
- Source
Hash string - The specification source hash.
- Learning
Config SpecLearning Config Args - Configuration for spec learning.
- Name string
- The name for this specification.
- Source
File string - The specification file.
- Source
Hash string - The specification source hash.
- learning
Config SpecLearning Config - Configuration for spec learning.
- name String
- The name for this specification.
- source
File String - The specification file.
- source
Hash String - The specification source hash.
- learning
Config SpecLearning Config - Configuration for spec learning.
- name string
- The name for this specification.
- source
File string - The specification file.
- source
Hash string - The specification source hash.
- learning_
config SpecLearning Config Args - Configuration for spec learning.
- name str
- The name for this specification.
- source_
file str - The specification file.
- source_
hash str - The specification source hash.
- learning
Config Property Map - Configuration for spec learning.
- name String
- The name for this specification.
- source
File String - The specification file.
- source
Hash String - The specification source hash.
Supporting Types
SpecLearningConfig, SpecLearningConfigArgs
- Learning
Mode string - Spec learning mode configuration options. Valid values: all, pathsonly, pathscustom. Note: When using 'all' or 'paths*only' modes, the include** flags will be preserved in state but are not applicable as the mode overrides these settings.
- Include
Query boolParams - Include query parameters during spec learning.
- Include
Request boolBody - Include request body during spec learning.
- Include
Request boolHeaders - Include request headers during spec learning.
- Include
Response boolBody - Include response body during spec learning.
- Include
Response boolHeaders - Include response headers during spec learning.
- Learning
Mode string - Spec learning mode configuration options. Valid values: all, pathsonly, pathscustom. Note: When using 'all' or 'paths*only' modes, the include** flags will be preserved in state but are not applicable as the mode overrides these settings.
- Include
Query boolParams - Include query parameters during spec learning.
- Include
Request boolBody - Include request body during spec learning.
- Include
Request boolHeaders - Include request headers during spec learning.
- Include
Response boolBody - Include response body during spec learning.
- Include
Response boolHeaders - Include response headers during spec learning.
- learning
Mode String - Spec learning mode configuration options. Valid values: all, pathsonly, pathscustom. Note: When using 'all' or 'paths*only' modes, the include** flags will be preserved in state but are not applicable as the mode overrides these settings.
- include
Query BooleanParams - Include query parameters during spec learning.
- include
Request BooleanBody - Include request body during spec learning.
- include
Request BooleanHeaders - Include request headers during spec learning.
- include
Response BooleanBody - Include response body during spec learning.
- include
Response BooleanHeaders - Include response headers during spec learning.
- learning
Mode string - Spec learning mode configuration options. Valid values: all, pathsonly, pathscustom. Note: When using 'all' or 'paths*only' modes, the include** flags will be preserved in state but are not applicable as the mode overrides these settings.
- include
Query booleanParams - Include query parameters during spec learning.
- include
Request booleanBody - Include request body during spec learning.
- include
Request booleanHeaders - Include request headers during spec learning.
- include
Response booleanBody - Include response body during spec learning.
- include
Response booleanHeaders - Include response headers during spec learning.
- learning_
mode str - Spec learning mode configuration options. Valid values: all, pathsonly, pathscustom. Note: When using 'all' or 'paths*only' modes, the include** flags will be preserved in state but are not applicable as the mode overrides these settings.
- include_
query_ boolparams - Include query parameters during spec learning.
- include_
request_ boolbody - Include request body during spec learning.
- include_
request_ boolheaders - Include request headers during spec learning.
- include_
response_ boolbody - Include response body during spec learning.
- include_
response_ boolheaders - Include response headers during spec learning.
- learning
Mode String - Spec learning mode configuration options. Valid values: all, pathsonly, pathscustom. Note: When using 'all' or 'paths*only' modes, the include** flags will be preserved in state but are not applicable as the mode overrides these settings.
- include
Query BooleanParams - Include query parameters during spec learning.
- include
Request BooleanBody - Include request body during spec learning.
- include
Request BooleanHeaders - Include request headers during spec learning.
- include
Response BooleanBody - Include response body during spec learning.
- include
Response BooleanHeaders - Include response headers during spec learning.
Import
The pulumi import command can be used, for example:
!/bin/bash
$ pulumi import impart:index/spec:Spec example "<id>"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- impart impart-security/pulumi-impart
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
impartTerraform Provider.
published on Wednesday, Mar 18, 2026 by Impart Security
