Class CfnResourcePolicyPropsMixin
Attaches a resource-based permission policy to a secret.
Implements
Inherited Members
Namespace: Amazon.CDK.Mixins.Preview.AWS.SecretsManager.Mixins
Assembly: Amazon.CDK.Mixins.Preview.dll
Syntax (csharp)
public class CfnResourcePolicyPropsMixin : Mixin, IMixin
Syntax (vb)
Public Class CfnResourcePolicyPropsMixin Inherits Mixin Implements IMixin
Remarks
A resource-based policy is optional. If a secret already has a resource policy attached, you must first remove it before attaching a new policy using this CloudFormation resource. You can remove the policy using the console , CLI , or API . For more information, see Authentication and access control for Secrets Manager .
Required permissions: secretsmanager:PutResourcePolicy , secretsmanager:GetResourcePolicy . For more information, see IAM policy actions for Secrets Manager and Authentication and access control in Secrets Manager .
CloudformationResource: AWS::SecretsManager::ResourcePolicy
Mixin: true
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.Mixins.Preview.Mixins;
using Amazon.CDK.Mixins.Preview.AWS.SecretsManager.Mixins;
var resourcePolicy;
var cfnResourcePolicyPropsMixin = new CfnResourcePolicyPropsMixin(new CfnResourcePolicyMixinProps {
BlockPublicPolicy = false,
ResourcePolicy = resourcePolicy,
SecretId = "secretId"
}, new CfnPropertyMixinOptions {
Strategy = PropertyMergeStrategy.OVERRIDE
});
Synopsis
Constructors
| CfnResourcePolicyPropsMixin(ICfnResourcePolicyMixinProps, ICfnPropertyMixinOptions?) | Create a mixin to apply properties to |
Properties
| CFN_PROPERTY_KEYS | Attaches a resource-based permission policy to a secret. |
| Props | Attaches a resource-based permission policy to a secret. |
| Strategy | Attaches a resource-based permission policy to a secret. |
Methods
| ApplyTo(IConstruct) | Apply the mixin properties to the construct. |
| Supports(IConstruct) | Check if this mixin supports the given construct. |
Constructors
CfnResourcePolicyPropsMixin(ICfnResourcePolicyMixinProps, ICfnPropertyMixinOptions?)
Create a mixin to apply properties to AWS::SecretsManager::ResourcePolicy.
public CfnResourcePolicyPropsMixin(ICfnResourcePolicyMixinProps props, ICfnPropertyMixinOptions? options = null)
Parameters
- props ICfnResourcePolicyMixinProps
L1 properties to apply.
- options ICfnPropertyMixinOptions
Mixin options.
Remarks
A resource-based policy is optional. If a secret already has a resource policy attached, you must first remove it before attaching a new policy using this CloudFormation resource. You can remove the policy using the console , CLI , or API . For more information, see Authentication and access control for Secrets Manager .
Required permissions: secretsmanager:PutResourcePolicy , secretsmanager:GetResourcePolicy . For more information, see IAM policy actions for Secrets Manager and Authentication and access control in Secrets Manager .
CloudformationResource: AWS::SecretsManager::ResourcePolicy
Mixin: true
ExampleMetadata: fixture=_generated
Properties
CFN_PROPERTY_KEYS
Attaches a resource-based permission policy to a secret.
protected static string[] CFN_PROPERTY_KEYS { get; }
Property Value
string[]
Remarks
A resource-based policy is optional. If a secret already has a resource policy attached, you must first remove it before attaching a new policy using this CloudFormation resource. You can remove the policy using the console , CLI , or API . For more information, see Authentication and access control for Secrets Manager .
Required permissions: secretsmanager:PutResourcePolicy , secretsmanager:GetResourcePolicy . For more information, see IAM policy actions for Secrets Manager and Authentication and access control in Secrets Manager .
CloudformationResource: AWS::SecretsManager::ResourcePolicy
Mixin: true
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.Mixins.Preview.Mixins;
using Amazon.CDK.Mixins.Preview.AWS.SecretsManager.Mixins;
var resourcePolicy;
var cfnResourcePolicyPropsMixin = new CfnResourcePolicyPropsMixin(new CfnResourcePolicyMixinProps {
BlockPublicPolicy = false,
ResourcePolicy = resourcePolicy,
SecretId = "secretId"
}, new CfnPropertyMixinOptions {
Strategy = PropertyMergeStrategy.OVERRIDE
});
Props
Attaches a resource-based permission policy to a secret.
protected virtual ICfnResourcePolicyMixinProps Props { get; }
Property Value
Remarks
A resource-based policy is optional. If a secret already has a resource policy attached, you must first remove it before attaching a new policy using this CloudFormation resource. You can remove the policy using the console , CLI , or API . For more information, see Authentication and access control for Secrets Manager .
Required permissions: secretsmanager:PutResourcePolicy , secretsmanager:GetResourcePolicy . For more information, see IAM policy actions for Secrets Manager and Authentication and access control in Secrets Manager .
CloudformationResource: AWS::SecretsManager::ResourcePolicy
Mixin: true
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.Mixins.Preview.Mixins;
using Amazon.CDK.Mixins.Preview.AWS.SecretsManager.Mixins;
var resourcePolicy;
var cfnResourcePolicyPropsMixin = new CfnResourcePolicyPropsMixin(new CfnResourcePolicyMixinProps {
BlockPublicPolicy = false,
ResourcePolicy = resourcePolicy,
SecretId = "secretId"
}, new CfnPropertyMixinOptions {
Strategy = PropertyMergeStrategy.OVERRIDE
});
Strategy
Attaches a resource-based permission policy to a secret.
protected virtual PropertyMergeStrategy Strategy { get; }
Property Value
Remarks
A resource-based policy is optional. If a secret already has a resource policy attached, you must first remove it before attaching a new policy using this CloudFormation resource. You can remove the policy using the console , CLI , or API . For more information, see Authentication and access control for Secrets Manager .
Required permissions: secretsmanager:PutResourcePolicy , secretsmanager:GetResourcePolicy . For more information, see IAM policy actions for Secrets Manager and Authentication and access control in Secrets Manager .
CloudformationResource: AWS::SecretsManager::ResourcePolicy
Mixin: true
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.Mixins.Preview.Mixins;
using Amazon.CDK.Mixins.Preview.AWS.SecretsManager.Mixins;
var resourcePolicy;
var cfnResourcePolicyPropsMixin = new CfnResourcePolicyPropsMixin(new CfnResourcePolicyMixinProps {
BlockPublicPolicy = false,
ResourcePolicy = resourcePolicy,
SecretId = "secretId"
}, new CfnPropertyMixinOptions {
Strategy = PropertyMergeStrategy.OVERRIDE
});
Methods
ApplyTo(IConstruct)
Apply the mixin properties to the construct.
public override IConstruct ApplyTo(IConstruct construct)
Parameters
- construct IConstruct
Returns
IConstruct
Overrides
Remarks
A resource-based policy is optional. If a secret already has a resource policy attached, you must first remove it before attaching a new policy using this CloudFormation resource. You can remove the policy using the console , CLI , or API . For more information, see Authentication and access control for Secrets Manager .
Required permissions: secretsmanager:PutResourcePolicy , secretsmanager:GetResourcePolicy . For more information, see IAM policy actions for Secrets Manager and Authentication and access control in Secrets Manager .
CloudformationResource: AWS::SecretsManager::ResourcePolicy
Mixin: true
ExampleMetadata: fixture=_generated
Supports(IConstruct)
Check if this mixin supports the given construct.
public override bool Supports(IConstruct construct)
Parameters
- construct IConstruct
Returns
Overrides
Remarks
A resource-based policy is optional. If a secret already has a resource policy attached, you must first remove it before attaching a new policy using this CloudFormation resource. You can remove the policy using the console , CLI , or API . For more information, see Authentication and access control for Secrets Manager .
Required permissions: secretsmanager:PutResourcePolicy , secretsmanager:GetResourcePolicy . For more information, see IAM policy actions for Secrets Manager and Authentication and access control in Secrets Manager .
CloudformationResource: AWS::SecretsManager::ResourcePolicy
Mixin: true
ExampleMetadata: fixture=_generated