AwsSdkCall

class aws_cdk.custom_resources.AwsSdkCall(*, action, service, api_version=None, catch_error_pattern=None, output_path=None, parameters=None, physical_resource_id=None, physical_resource_id_path=None, region=None)

Bases: object

__init__(*, action, service, api_version=None, catch_error_pattern=None, output_path=None, parameters=None, physical_resource_id=None, physical_resource_id_path=None, region=None)

An AWS SDK call.

Parameters
  • action (str) – The service action to call.

  • service (str) – The service to call.

  • api_version (Optional[str]) – API version to use for the service. Default: - use latest available API version

  • catch_error_pattern (Optional[str]) – The regex pattern to use to catch API errors. The code property of the Error object will be tested against this pattern. If there is a match an error will not be thrown. Default: - do not catch errors

  • output_path (Optional[str]) – Restrict the data returned by the custom resource to a specific path in the API response. Use this to limit the data returned by the custom resource if working with API calls that could potentially result in custom response objects exceeding the hard limit of 4096 bytes. Example for ECS / updateService: ‘service.deploymentConfiguration.maximumPercent’ Default: - return all data

  • parameters (Optional[Any]) – The parameters for the service action.

  • physical_resource_id (Optional[str]) – The physical resource id of the custom resource for this call. Either physicalResourceId or physicalResourceIdPath must be specified for onCreate or onUpdate calls. Default: - no physical resource id

  • physical_resource_id_path (Optional[str]) – The path to the data in the API call response to use as the physical resource id. Either physicalResourceId or physicalResourceIdPath must be specified for onCreate or onUpdate calls. Default: - no path

  • region (Optional[str]) – The region to send service requests to. Note: Cross-region operations are generally considered an anti-pattern. Consider first deploying a stack in that region. Default: - the region where this custom resource is deployed

stability :stability: experimental

Attributes

action

The service action to call.

see :see: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html stability :stability: experimental

Return type

str

api_version

API version to use for the service.

default :default: - use latest available API version

see :see: https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/locking-api-versions.html stability :stability: experimental

Return type

Optional[str]

catch_error_pattern

The regex pattern to use to catch API errors.

The code property of the Error object will be tested against this pattern. If there is a match an error will not be thrown.

default :default: - do not catch errors

stability :stability: experimental

Return type

Optional[str]

output_path

Restrict the data returned by the custom resource to a specific path in the API response.

Use this to limit the data returned by the custom resource if working with API calls that could potentially result in custom response objects exceeding the hard limit of 4096 bytes.

Example for ECS / updateService: ‘service.deploymentConfiguration.maximumPercent’

default :default: - return all data

stability :stability: experimental

Return type

Optional[str]

parameters

The parameters for the service action.

see :see: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html stability :stability: experimental

Return type

Any

physical_resource_id

The physical resource id of the custom resource for this call.

Either physicalResourceId or physicalResourceIdPath must be specified for onCreate or onUpdate calls.

default :default: - no physical resource id

stability :stability: experimental

Return type

Optional[str]

physical_resource_id_path

The path to the data in the API call response to use as the physical resource id.

Either physicalResourceId or physicalResourceIdPath must be specified for onCreate or onUpdate calls.

default :default: - no path

stability :stability: experimental

Return type

Optional[str]

region

The region to send service requests to.

Note: Cross-region operations are generally considered an anti-pattern. Consider first deploying a stack in that region.

default :default: - the region where this custom resource is deployed

stability :stability: experimental

Return type

Optional[str]

service

The service to call.

see :see: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html stability :stability: experimental

Return type

str