Class SdkCallsPolicyOptions
Options for the auto-generation of policies based on the configured SDK calls.
Inheritance
System.Object
SdkCallsPolicyOptions
Implements
Namespace: Amazon.CDK.CustomResources
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class SdkCallsPolicyOptions : Object, ISdkCallsPolicyOptions
Syntax (vb)
Public Class SdkCallsPolicyOptions
Inherits Object
Implements ISdkCallsPolicyOptions
Remarks
ExampleMetadata: infused
Examples
var getParameter = new AwsCustomResource(this, "GetParameter", new AwsCustomResourceProps {
OnUpdate = new AwsSdkCall { // will also be called for a CREATE event
Service = "SSM",
Action = "GetParameter",
Parameters = new Dictionary<string, object> {
{ "Name", "my-parameter" },
{ "WithDecryption", true }
},
PhysicalResourceId = PhysicalResourceId.Of(Date.Now().ToString()) },
Policy = AwsCustomResourcePolicy.FromSdkCalls(new SdkCallsPolicyOptions {
Resources = AwsCustomResourcePolicy.ANY_RESOURCE
})
});
// Use the value in another construct with
getParameter.GetResponseField("Parameter.Value");
Synopsis
Constructors
SdkCallsPolicyOptions() |
Properties
Resources | The resources that the calls will have access to. |
Constructors
SdkCallsPolicyOptions()
public SdkCallsPolicyOptions()
Properties
Resources
The resources that the calls will have access to.
public string[] Resources { get; set; }
Property Value
System.String[]
Remarks
It is best to use specific resource ARN's when possible. However, you can also use AwsCustomResourcePolicy.ANY_RESOURCE
to allow access to all resources. For example, when onCreate
is used to create a resource which you don't
know the physical name of in advance.
Note that will apply to ALL SDK calls.