CfnCloudFormationProvisionedProduct
- class aws_cdk.aws_servicecatalog.CfnCloudFormationProvisionedProduct(scope, id, *, accept_language=None, notification_arns=None, path_id=None, path_name=None, product_id=None, product_name=None, provisioned_product_name=None, provisioning_artifact_id=None, provisioning_artifact_name=None, provisioning_parameters=None, provisioning_preferences=None, tags=None)
Bases:
CfnResource
Provisions the specified product.
A provisioned product is a resourced instance of a product. For example, provisioning a product based on a AWS CloudFormation template launches a AWS CloudFormation stack and its underlying resources. You can check the status of this request using DescribeRecord .
If the request contains a tag key with an empty list of values, there is a tag conflict for that key. Do not include conflicted keys as tags, or this causes the error “Parameter validation failed: Missing required parameter in Tags[ N ]: Value “.
- See:
- CloudformationResource:
AWS::ServiceCatalog::CloudFormationProvisionedProduct
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_servicecatalog as servicecatalog cfn_cloud_formation_provisioned_product = servicecatalog.CfnCloudFormationProvisionedProduct(self, "MyCfnCloudFormationProvisionedProduct", accept_language="acceptLanguage", notification_arns=["notificationArns"], path_id="pathId", path_name="pathName", product_id="productId", product_name="productName", provisioned_product_name="provisionedProductName", provisioning_artifact_id="provisioningArtifactId", provisioning_artifact_name="provisioningArtifactName", provisioning_parameters=[servicecatalog.CfnCloudFormationProvisionedProduct.ProvisioningParameterProperty( key="key", value="value" )], provisioning_preferences=servicecatalog.CfnCloudFormationProvisionedProduct.ProvisioningPreferencesProperty( stack_set_accounts=["stackSetAccounts"], stack_set_failure_tolerance_count=123, stack_set_failure_tolerance_percentage=123, stack_set_max_concurrency_count=123, stack_set_max_concurrency_percentage=123, stack_set_operation_type="stackSetOperationType", stack_set_regions=["stackSetRegions"] ), tags=[CfnTag( key="key", value="value" )] )
- Parameters:
scope (
Construct
) – Scope in which this resource is defined.id (
str
) – Construct identifier for this resource (unique in its scope).accept_language (
Optional
[str
]) – The language code. -jp
- Japanese -zh
- Chinesenotification_arns (
Optional
[Sequence
[str
]]) – Passed to AWS CloudFormation . The SNS topic ARNs to which to publish stack-related events.path_id (
Optional
[str
]) – The path identifier of the product. This value is optional if the product has a default path, and required if the product has more than one path. To list the paths for a product, use ListLaunchPaths . .. epigraph:: You must provide the name or ID, but not both.path_name (
Optional
[str
]) –The name of the path. This value is optional if the product has a default path, and required if the product has more than one path. To list the paths for a product, use ListLaunchPaths . .. epigraph:: You must provide the name or ID, but not both.
product_id (
Optional
[str
]) – The product identifier. .. epigraph:: You must specify either the ID or the name of the product, but not both.product_name (
Optional
[str
]) – The name of the Service Catalog product. Each time a stack is created or updated, ifProductName
is provided it will successfully resolve toProductId
as long as only one product exists in the account or Region with thatProductName
. .. epigraph:: You must specify either the name or the ID of the product, but not both.provisioned_product_name (
Optional
[str
]) – A user-friendly name for the provisioned product. This value must be unique for the AWS account and cannot be updated after the product is provisioned.provisioning_artifact_id (
Optional
[str
]) – The identifier of the provisioning artifact (also known as a version). .. epigraph:: You must specify either the ID or the name of the provisioning artifact, but not both.provisioning_artifact_name (
Optional
[str
]) – The name of the provisioning artifact (also known as a version) for the product. This name must be unique for the product. .. epigraph:: You must specify either the name or the ID of the provisioning artifact, but not both. You must also specify either the name or the ID of the product, but not both.provisioning_parameters (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,ProvisioningParameterProperty
,Dict
[str
,Any
]]],None
]) – Parameters specified by the administrator that are required for provisioning the product.provisioning_preferences (
Union
[IResolvable
,ProvisioningPreferencesProperty
,Dict
[str
,Any
],None
]) – StackSet preferences that are required for provisioning the product or updating a provisioned product.tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – One or more tags. .. epigraph:: Requires the provisioned product to have an ResourceUpdateConstraint resource withTagUpdatesOnProvisionedProduct
set toALLOWED
to allow tag updates. IfRESOURCE_UPDATE
constraint is not present, tags updates are ignored.
Methods
- add_deletion_override(path)
Syntactic sugar for
addOverride(path, undefined)
.- Parameters:
path (
str
) – The path of the value to delete.- Return type:
None
- add_dependency(target)
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
- Parameters:
target (
CfnResource
) –- Return type:
None
- add_depends_on(target)
(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
- Parameters:
target (
CfnResource
) –- Deprecated:
use addDependency
- Stability:
deprecated
- Return type:
None
- add_metadata(key, value)
Add a value to the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –value (
Any
) –
- See:
- Return type:
None
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- add_override(path, value)
Adds an override to the synthesized CloudFormation resource.
To add a property override, either use
addPropertyOverride
or prefixpath
with “Properties.” (i.e.Properties.TopicName
).If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal
.
in the property name, prefix with a\
. In most programming languages you will need to write this as"\\."
because the\
itself will need to be escaped.For example:
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"]) cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")
would add the overrides Example:
"Properties": { "GlobalSecondaryIndexes": [ { "Projection": { "NonKeyAttributes": [ "myattribute" ] ... } ... }, { "ProjectionType": "INCLUDE" ... }, ] ... }
The
value
argument toaddOverride
will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.- Parameters:
path (
str
) –The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.
value (
Any
) –The value. Could be primitive or complex.
- Return type:
None
- add_property_deletion_override(property_path)
Adds an override that deletes the value of a property from the resource definition.
- Parameters:
property_path (
str
) – The path to the property.- Return type:
None
- add_property_override(property_path, value)
Adds an override to a resource property.
Syntactic sugar for
addOverride("Properties.<...>", value)
.- Parameters:
property_path (
str
) – The path of the property.value (
Any
) – The value.
- Return type:
None
- apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)
Sets the deletion policy of the resource based on the removal policy specified.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT
). A list of resources that support this policy can be found in the following link:- Parameters:
policy (
Optional
[RemovalPolicy
]) –apply_to_update_replace_policy (
Optional
[bool
]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: truedefault (
Optional
[RemovalPolicy
]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.
- See:
- Return type:
None
- get_att(attribute_name, type_hint=None)
Returns a token for an runtime attribute of this resource.
Ideally, use generated attribute accessors (e.g.
resource.arn
), but this can be used for future compatibility in case there is no generated attribute.- Parameters:
attribute_name (
str
) – The name of the attribute.type_hint (
Optional
[ResolutionTypeHint
]) –
- Return type:
- get_metadata(key)
Retrieve a value value from the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –- See:
- Return type:
Any
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- inspect(inspector)
Examines the CloudFormation resource and discloses attributes.
- Parameters:
inspector (
TreeInspector
) – tree inspector to collect and process attributes.- Return type:
None
- obtain_dependencies()
Retrieves an array of resources this resource depends on.
This assembles dependencies on resources across stacks (including nested stacks) automatically.
- Return type:
List
[Union
[Stack
,CfnResource
]]
- obtain_resource_dependencies()
Get a shallow copy of dependencies between this resource and other resources in the same stack.
- Return type:
List
[CfnResource
]
- override_logical_id(new_logical_id)
Overrides the auto-generated logical ID with a specific ID.
- Parameters:
new_logical_id (
str
) – The new logical ID to use for this stack element.- Return type:
None
- remove_dependency(target)
Indicates that this resource no longer depends on another resource.
This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
- Parameters:
target (
CfnResource
) –- Return type:
None
- replace_dependency(target, new_target)
Replaces one dependency with another.
- Parameters:
target (
CfnResource
) – The dependency to replace.new_target (
CfnResource
) – The new dependency to add.
- Return type:
None
- to_string()
Returns a string representation of this construct.
- Return type:
str
- Returns:
a string representation of this resource
Attributes
- CFN_RESOURCE_TYPE_NAME = 'AWS::ServiceCatalog::CloudFormationProvisionedProduct'
- accept_language
The language code.
- attr_cloudformation_stack_arn
CloudformationStackArn
- Type:
cloudformationAttribute
- attr_outputs
List of key-value pair outputs.
- CloudformationAttribute:
Outputs
- attr_provisioned_product_id
The ID of the provisioned product.
- CloudformationAttribute:
ProvisionedProductId
- attr_record_id
The ID of the record, such as
rec-rjeatvy434trk
.- CloudformationAttribute:
RecordId
- cfn_options
Options for this resource, such as condition, update policy etc.
- cfn_resource_type
AWS resource type.
- creation_stack
return:
the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.
- logical_id
The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use
overrideLogicalId(newLogicalId)
.- Returns:
the logical ID as a stringified token. This value will only get resolved during synthesis.
- node
The tree node.
- notification_arns
Passed to AWS CloudFormation .
- path_id
The path identifier of the product.
- path_name
The name of the path.
- product_id
The product identifier.
- product_name
The name of the Service Catalog product.
- provisioned_product_name
A user-friendly name for the provisioned product.
- provisioning_artifact_id
The identifier of the provisioning artifact (also known as a version).
- provisioning_artifact_name
The name of the provisioning artifact (also known as a version) for the product.
- provisioning_parameters
Parameters specified by the administrator that are required for provisioning the product.
- provisioning_preferences
StackSet preferences that are required for provisioning the product or updating a provisioned product.
- ref
Return a string that will be resolved to a CloudFormation
{ Ref }
for this element.If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through
Lazy.any({ produce: resource.ref })
.
- stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
- tags
Tag Manager which manages the tags for this resource.
- tags_raw
One or more tags.
Static Methods
- classmethod is_cfn_element(x)
Returns
true
if a construct is a stack element (i.e. part of the synthesized cloudformation template).Uses duck-typing instead of
instanceof
to allow stack elements from different versions of this library to be included in the same stack.- Parameters:
x (
Any
) –- Return type:
bool
- Returns:
The construct as a stack element or undefined if it is not a stack element.
- classmethod is_cfn_resource(x)
Check whether the given object is a CfnResource.
- Parameters:
x (
Any
) –- Return type:
bool
- classmethod is_construct(x)
Checks if
x
is a construct.Use this method instead of
instanceof
to properly detectConstruct
instances, even when the construct library is symlinked.Explanation: in JavaScript, multiple copies of the
constructs
library on disk are seen as independent, completely different libraries. As a consequence, the classConstruct
in each copy of theconstructs
library is seen as a different class, and an instance of one class will not test asinstanceof
the other class.npm install
will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of theconstructs
library can be accidentally installed, andinstanceof
will behave unpredictably. It is safest to avoid usinginstanceof
, and using this type-testing method instead.- Parameters:
x (
Any
) – Any object.- Return type:
bool
- Returns:
true if
x
is an object created from a class which extendsConstruct
.
ProvisioningParameterProperty
- class CfnCloudFormationProvisionedProduct.ProvisioningParameterProperty(*, key, value)
Bases:
object
Information about a parameter used to provision a product.
- Parameters:
key (
str
) – The parameter key.value (
str
) – The parameter value.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_servicecatalog as servicecatalog provisioning_parameter_property = servicecatalog.CfnCloudFormationProvisionedProduct.ProvisioningParameterProperty( key="key", value="value" )
Attributes
- key
The parameter key.
ProvisioningPreferencesProperty
- class CfnCloudFormationProvisionedProduct.ProvisioningPreferencesProperty(*, stack_set_accounts=None, stack_set_failure_tolerance_count=None, stack_set_failure_tolerance_percentage=None, stack_set_max_concurrency_count=None, stack_set_max_concurrency_percentage=None, stack_set_operation_type=None, stack_set_regions=None)
Bases:
object
The user-defined preferences that will be applied when updating a provisioned product.
Not all preferences are applicable to all provisioned product type
One or more AWS accounts that will have access to the provisioned product.
Applicable only to a
CFN_STACKSET
provisioned product type.The AWS accounts specified should be within the list of accounts in the
STACKSET
constraint. To get the list of accounts in theSTACKSET
constraint, use theDescribeProvisioningParameters
operation.If no values are specified, the default value is all accounts from the
STACKSET
constraint.- Parameters:
stack_set_accounts (
Optional
[Sequence
[str
]]) – One or more AWS accounts where the provisioned product will be available. Applicable only to aCFN_STACKSET
provisioned product type. The specified accounts should be within the list of accounts from theSTACKSET
constraint. To get the list of accounts in theSTACKSET
constraint, use theDescribeProvisioningParameters
operation. If no values are specified, the default value is all acounts from theSTACKSET
constraint.stack_set_failure_tolerance_count (
Union
[int
,float
,None
]) – The number of accounts, per Region, for which this operation can fail before AWS Service Catalog stops the operation in that Region. If the operation is stopped in a Region, AWS Service Catalog doesn’t attempt the operation in any subsequent Regions. Applicable only to aCFN_STACKSET
provisioned product type. Conditional: You must specify eitherStackSetFailureToleranceCount
orStackSetFailureTolerancePercentage
, but not both. The default value is0
if no value is specified.stack_set_failure_tolerance_percentage (
Union
[int
,float
,None
]) – The percentage of accounts, per Region, for which this stack operation can fail before AWS Service Catalog stops the operation in that Region. If the operation is stopped in a Region, AWS Service Catalog doesn’t attempt the operation in any subsequent Regions. When calculating the number of accounts based on the specified percentage, AWS Service Catalog rounds down to the next whole number. Applicable only to aCFN_STACKSET
provisioned product type. Conditional: You must specify eitherStackSetFailureToleranceCount
orStackSetFailureTolerancePercentage
, but not both.stack_set_max_concurrency_count (
Union
[int
,float
,None
]) – The maximum number of accounts in which to perform this operation at one time. This is dependent on the value ofStackSetFailureToleranceCount
.StackSetMaxConcurrentCount
is at most one more than theStackSetFailureToleranceCount
. Note that this setting lets you specify the maximum for operations. For large deployments, under certain circumstances the actual number of accounts acted upon concurrently may be lower due to service throttling. Applicable only to aCFN_STACKSET
provisioned product type. Conditional: You must specify eitherStackSetMaxConcurrentCount
orStackSetMaxConcurrentPercentage
, but not both.stack_set_max_concurrency_percentage (
Union
[int
,float
,None
]) – The maximum percentage of accounts in which to perform this operation at one time. When calculating the number of accounts based on the specified percentage, AWS Service Catalog rounds down to the next whole number. This is true except in cases where rounding down would result is zero. In this case, AWS Service Catalog sets the number as1
instead. Note that this setting lets you specify the maximum for operations. For large deployments, under certain circumstances the actual number of accounts acted upon concurrently may be lower due to service throttling. Applicable only to aCFN_STACKSET
provisioned product type. Conditional: You must specify eitherStackSetMaxConcurrentCount
orStackSetMaxConcurrentPercentage
, but not both.stack_set_operation_type (
Optional
[str
]) – Determines what action AWS Service Catalog performs to a stack set or a stack instance represented by the provisioned product. The default value isUPDATE
if nothing is specified. Applicable only to aCFN_STACKSET
provisioned product type. - CREATE - Creates a new stack instance in the stack set represented by the provisioned product. In this case, only new stack instances are created based on accounts and Regions; if new ProductId or ProvisioningArtifactID are passed, they will be ignored. - UPDATE - Updates the stack set represented by the provisioned product and also its stack instances. - DELETE - Deletes a stack instance in the stack set represented by the provisioned product.stack_set_regions (
Optional
[Sequence
[str
]]) – One or more AWS Regions where the provisioned product will be available. Applicable only to aCFN_STACKSET
provisioned product type. The specified Regions should be within the list of Regions from theSTACKSET
constraint. To get the list of Regions in theSTACKSET
constraint, use theDescribeProvisioningParameters
operation. If no values are specified, the default value is all Regions from theSTACKSET
constraint.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_servicecatalog as servicecatalog provisioning_preferences_property = servicecatalog.CfnCloudFormationProvisionedProduct.ProvisioningPreferencesProperty( stack_set_accounts=["stackSetAccounts"], stack_set_failure_tolerance_count=123, stack_set_failure_tolerance_percentage=123, stack_set_max_concurrency_count=123, stack_set_max_concurrency_percentage=123, stack_set_operation_type="stackSetOperationType", stack_set_regions=["stackSetRegions"] )
Attributes
- stack_set_accounts
One or more AWS accounts where the provisioned product will be available.
Applicable only to a
CFN_STACKSET
provisioned product type.The specified accounts should be within the list of accounts from the
STACKSET
constraint. To get the list of accounts in theSTACKSET
constraint, use theDescribeProvisioningParameters
operation.If no values are specified, the default value is all acounts from the
STACKSET
constraint.
- stack_set_failure_tolerance_count
The number of accounts, per Region, for which this operation can fail before AWS Service Catalog stops the operation in that Region.
If the operation is stopped in a Region, AWS Service Catalog doesn’t attempt the operation in any subsequent Regions.
Applicable only to a
CFN_STACKSET
provisioned product type.Conditional: You must specify either
StackSetFailureToleranceCount
orStackSetFailureTolerancePercentage
, but not both.The default value is
0
if no value is specified.
- stack_set_failure_tolerance_percentage
The percentage of accounts, per Region, for which this stack operation can fail before AWS Service Catalog stops the operation in that Region.
If the operation is stopped in a Region, AWS Service Catalog doesn’t attempt the operation in any subsequent Regions.
When calculating the number of accounts based on the specified percentage, AWS Service Catalog rounds down to the next whole number.
Applicable only to a
CFN_STACKSET
provisioned product type.Conditional: You must specify either
StackSetFailureToleranceCount
orStackSetFailureTolerancePercentage
, but not both.
- stack_set_max_concurrency_count
The maximum number of accounts in which to perform this operation at one time.
This is dependent on the value of
StackSetFailureToleranceCount
.StackSetMaxConcurrentCount
is at most one more than theStackSetFailureToleranceCount
.Note that this setting lets you specify the maximum for operations. For large deployments, under certain circumstances the actual number of accounts acted upon concurrently may be lower due to service throttling.
Applicable only to a
CFN_STACKSET
provisioned product type.Conditional: You must specify either
StackSetMaxConcurrentCount
orStackSetMaxConcurrentPercentage
, but not both.
- stack_set_max_concurrency_percentage
The maximum percentage of accounts in which to perform this operation at one time.
When calculating the number of accounts based on the specified percentage, AWS Service Catalog rounds down to the next whole number. This is true except in cases where rounding down would result is zero. In this case, AWS Service Catalog sets the number as
1
instead.Note that this setting lets you specify the maximum for operations. For large deployments, under certain circumstances the actual number of accounts acted upon concurrently may be lower due to service throttling.
Applicable only to a
CFN_STACKSET
provisioned product type.Conditional: You must specify either
StackSetMaxConcurrentCount
orStackSetMaxConcurrentPercentage
, but not both.
- stack_set_operation_type
Determines what action AWS Service Catalog performs to a stack set or a stack instance represented by the provisioned product.
The default value is
UPDATE
if nothing is specified.Applicable only to a
CFN_STACKSET
provisioned product type.CREATE - Creates a new stack instance in the stack set represented by the provisioned product. In this case, only new stack instances are created based on accounts and Regions; if new ProductId or ProvisioningArtifactID are passed, they will be ignored.
UPDATE - Updates the stack set represented by the provisioned product and also its stack instances.
DELETE - Deletes a stack instance in the stack set represented by the provisioned product.
- stack_set_regions
One or more AWS Regions where the provisioned product will be available.
Applicable only to a
CFN_STACKSET
provisioned product type.The specified Regions should be within the list of Regions from the
STACKSET
constraint. To get the list of Regions in theSTACKSET
constraint, use theDescribeProvisioningParameters
operation.If no values are specified, the default value is all Regions from the
STACKSET
constraint.