AwsSdkCall

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

Bases: object

__init__(*, action, service, api_version=None, ignore_error_codes_matching=None, output_path=None, parameters=None, physical_resource_id=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

  • ignore_error_codes_matching (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. Default: - no parameters

  • physical_resource_id (Optional[PhysicalResourceId]) – The physical resource id of the custom resource for this call. Mandatory for onCreate or onUpdate calls. Default: - no physical resource id

  • 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

Return type

None

Attributes

action

The service action to call.

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

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

Return type

Optional[str]

ignore_error_codes_matching

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

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

Return type

Optional[str]

parameters

The parameters for the service action.

default :default: - no parameters

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

Return type

Any

physical_resource_id

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

Mandatory for onCreate or onUpdate calls.

default :default: - no physical resource id

Return type

Optional[PhysicalResourceId]

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

Return type

Optional[str]

service

The service to call.

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

Return type

str