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
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 versionignore_error_codes_matching (
Optional
[str
]) – The regex pattern to use to catch API errors. Thecode
property of theError
object will be tested against this pattern. If there is a match an error will not be thrown. Default: - do not catch errorsoutput_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 dataparameters (
Optional
[Any
]) – The parameters for the service action. Default: - no parametersphysical_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 idregion (
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
Attributes
-
action
¶ The service action to call.
- See
https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html
- Return type
str
-
api_version
¶ API version to use for the service.
- Default
use latest available API version
- 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 theError
object will be tested against this pattern. If there is a match an error will not be thrown.- 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
return all data
- Return type
Optional
[str
]
-
parameters
¶ The parameters for the service action.
- Default
no parameters
- 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
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
the region where this custom resource is deployed
- Return type
Optional
[str
]
-
service
¶ The service to call.
- See
https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html
- Return type
str