interface AwsSdkCall
Language | Type name |
---|---|
.NET | Amazon.CDK.CustomResources.AwsSdkCall |
Java | software.amazon.awscdk.customresources.AwsSdkCall |
Python | aws_cdk.custom_resources.AwsSdkCall |
TypeScript (source) | @aws-cdk/custom-resources » AwsSdkCall |
An AWS SDK call.
Example
const awsCustom = new cr.AwsCustomResource(this, 'aws-custom', {
onCreate: {
service: '...',
action: '...',
parameters: {
text: '...',
},
physicalResourceId: cr.PhysicalResourceId.of('...'),
},
onUpdate: {
service: '...',
action: '...',
parameters: {
text: '...',
resourceId: new cr.PhysicalResourceIdReference(),
},
},
policy: cr.AwsCustomResourcePolicy.fromSdkCalls({
resources: cr.AwsCustomResourcePolicy.ANY_RESOURCE,
}),
})
Properties
Name | Type | Description |
---|---|---|
action | string | The service action to call. |
service | string | The service to call. |
api | string | API version to use for the service. |
assumed | string | Used for running the SDK calls in underlying lambda with a different role Can be used primarily for cross-account requests to for example connect hostedzone with a shared vpc. |
ignore | string | The regex pattern to use to catch API errors. |
output | string | Restrict the data returned by the custom resource to a specific path in the API response. |
output | string[] | Restrict the data returned by the custom resource to specific paths in the API response. |
parameters? | any | The parameters for the service action. |
physical | Physical | The physical resource id of the custom resource for this call. |
region? | string | The region to send service requests to. |
action
Type:
string
The service action to call.
See also: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html
service
Type:
string
The service to call.
See also: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html
apiVersion?
Type:
string
(optional, default: use latest available API version)
API version to use for the service.
assumedRoleArn?
Type:
string
(optional, default: run without assuming role)
Used for running the SDK calls in underlying lambda with a different role Can be used primarily for cross-account requests to for example connect hostedzone with a shared vpc.
Example for Route53 / associateVPCWithHostedZone
ignoreErrorCodesMatching?
Type:
string
(optional, default: do not catch errors)
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.
outputPath?
⚠️ Deprecated: use outputPaths instead
Type:
string
(optional, default: return all data)
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'
outputPaths?
Type:
string[]
(optional, default: return all data)
Restrict the data returned by the custom resource to specific paths 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']
parameters?
Type:
any
(optional, default: no parameters)
The parameters for the service action.
See also: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html
physicalResourceId?
Type:
Physical
(optional, default: no physical resource id)
The physical resource id of the custom resource for this call.
Mandatory for onCreate or onUpdate calls.
region?
Type:
string
(optional, default: the region where this custom resource is deployed)
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.