Interface IGrantWithResourceOptions
Options for a grant operation.
Inherited Members
Namespace: Amazon.CDK.AWS.IAM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IGrantWithResourceOptions : ICommonGrantOptions
Syntax (vb)
Public Interface IGrantWithResourceOptions
Inherits ICommonGrantOptions
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IAM;
var conditions;
IGrantable grantable;
IResourceWithPolicy resourceWithPolicy;
var grantWithResourceOptions = new GrantWithResourceOptions {
Actions = new [] { "actions" },
Grantee = grantable,
Resource = resourceWithPolicy,
ResourceArns = new [] { "resourceArns" },
// the properties below are optional
Conditions = new Dictionary<string, IDictionary<string, object>> {
{ "conditionsKey", new Dictionary<string, object> {
{ "conditionsKey", conditions }
} }
},
ResourceSelfArns = new [] { "resourceSelfArns" }
};
Synopsis
Properties
Resource | The resource with a resource policy. |
ResourceSelfArns | When referring to the resource in a resource policy, use this as ARN. |
Properties
Resource
The resource with a resource policy.
IResourceWithPolicy Resource { get; }
Property Value
Remarks
The statement will be added to the resource policy if it couldn't be added to the principal policy.
ResourceSelfArns
When referring to the resource in a resource policy, use this as ARN.
virtual string[] ResourceSelfArns { get; }
Property Value
System.String[]
Remarks
(Depending on the resource type, this needs to be '*' in a resource policy).
Default: Same as regular resource ARNs