Show / Hide Table of Contents

Interface IGrantOnPrincipalAndResourceOptions

Options for a grant operation to both identity and resource.

Inherited Members
ICommonGrantOptions.Actions
ICommonGrantOptions.Grantee
ICommonGrantOptions.ResourceArns
ICommonGrantOptions.Conditions
Namespace: Amazon.CDK.AWS.IAM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IGrantOnPrincipalAndResourceOptions : ICommonGrantOptions
Syntax (vb)
Public Interface IGrantOnPrincipalAndResourceOptions 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;
            IPrincipal principal;
            IResourceWithPolicyV2 resourceWithPolicyV2;

            var grantOnPrincipalAndResourceOptions = new GrantOnPrincipalAndResourceOptions {
                Actions = new [] { "actions" },
                Grantee = grantable,
                Resource = resourceWithPolicyV2,
                ResourceArns = new [] { "resourceArns" },

                // the properties below are optional
                Conditions = new Dictionary<string, IDictionary<string, object>> {
                    { "conditionsKey", new Dictionary<string, object> {
                        { "conditionsKey", conditions }
                    } }
                },
                ResourcePolicyPrincipal = principal,
                ResourceSelfArns = new [] { "resourceSelfArns" }
            };

Synopsis

Properties

Resource

The resource with a resource policy.

ResourcePolicyPrincipal

The principal to use in the statement for the resource policy.

ResourceSelfArns

When referring to the resource in a resource policy, use this as ARN.

Properties

Resource

The resource with a resource policy.

IResourceWithPolicyV2 Resource { get; }
Property Value

IResourceWithPolicyV2

Remarks

The statement will always be added to the resource policy.

ResourcePolicyPrincipal

The principal to use in the statement for the resource policy.

IPrincipal? ResourcePolicyPrincipal { get; }
Property Value

IPrincipal

Remarks

Default: - the principal of the grantee will be used

ResourceSelfArns

When referring to the resource in a resource policy, use this as ARN.

string[]? ResourceSelfArns { get; }
Property Value

string[]

Remarks

(Depending on the resource type, this needs to be '*' in a resource policy).

Default: Same as regular resource ARNs

Back to top Generated by DocFX