Class CfnLayerVersionPermission
A CloudFormation AWS::Lambda::LayerVersionPermission
.
Inherited Members
Namespace: Amazon.CDK.AWS.Lambda
Assembly: Amazon.CDK.AWS.Lambda.dll
Syntax (csharp)
public class CfnLayerVersionPermission : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnLayerVersionPermission
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
The AWS::Lambda::LayerVersionPermission
resource adds permissions to the resource-based policy of a version of an Lambda layer . Use this action to grant layer usage permission to other accounts. You can grant permission to a single account, all AWS accounts, or all accounts in an organization.
Since the release of the UpdateReplacePolicy both UpdateReplacePolicy
and DeletionPolicy
are required to protect your Resources/LayerPermissions from deletion.
CloudformationResource: AWS::Lambda::LayerVersionPermission
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.Lambda;
var cfnLayerVersionPermission = new CfnLayerVersionPermission(this, "MyCfnLayerVersionPermission", new CfnLayerVersionPermissionProps {
Action = "action",
LayerVersionArn = "layerVersionArn",
Principal = "principal",
// the properties below are optional
OrganizationId = "organizationId"
});
Synopsis
Constructors
CfnLayerVersionPermission(Construct, String, ICfnLayerVersionPermissionProps) | Create a new |
CfnLayerVersionPermission(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnLayerVersionPermission(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
Action | The API action that grants access to the layer. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
LayerVersionArn | The name or Amazon Resource Name (ARN) of the layer. |
OrganizationId | With the principal set to |
Principal | An account ID, or |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnLayerVersionPermission(Construct, String, ICfnLayerVersionPermissionProps)
Create a new AWS::Lambda::LayerVersionPermission
.
public CfnLayerVersionPermission(Construct scope, string id, ICfnLayerVersionPermissionProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnLayerVersionPermissionProps
- resource properties.
CfnLayerVersionPermission(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnLayerVersionPermission(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnLayerVersionPermission(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnLayerVersionPermission(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
Action
The API action that grants access to the layer.
public virtual string Action { get; set; }
Property Value
System.String
Remarks
For example, lambda:GetLayerVersion
.
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
LayerVersionArn
The name or Amazon Resource Name (ARN) of the layer.
public virtual string LayerVersionArn { get; set; }
Property Value
System.String
Remarks
OrganizationId
With the principal set to *
, grant permission to all accounts in the specified organization.
public virtual string OrganizationId { get; set; }
Property Value
System.String
Remarks
Principal
An account ID, or *
to grant layer usage permission to all accounts in an organization, or all AWS accounts (if organizationId
is not specified).
public virtual string Principal { get; set; }
Property Value
System.String
Remarks
For the last case, make sure that you really do want all AWS accounts to have usage permission to this layer.
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>