Table of Contents

Class CfnResourceVersion

Namespace
Amazon.CDK
Assembly
Amazon.CDK.dll

A CloudFormation AWS::CloudFormation::ResourceVersion.

public class CfnResourceVersion : CfnResource, IConstruct, IConstruct, IDependable, IInspectable
Inheritance
CfnResourceVersion
Implements
IConstruct
Inherited Members

Examples

// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK;
             var cfnResourceVersion = new CfnResourceVersion(this, "MyCfnResourceVersion", new CfnResourceVersionProps {
                 SchemaHandlerPackage = "schemaHandlerPackage",
                 TypeName = "typeName",

                 // the properties below are optional
                 ExecutionRoleArn = "executionRoleArn",
                 LoggingConfig = new LoggingConfigProperty {
                     LogGroupName = "logGroupName",
                     LogRoleArn = "logRoleArn"
                 }
             });

Remarks

Registers a resource version with the CloudFormation service. Registering a resource version makes it available for use in CloudFormation templates in your AWS account , and includes:

    For more information on how to develop resources and ready them for registration, see Creating Resource Providers in the CloudFormation CLI User Guide .

    You can have a maximum of 50 resource versions registered at a time. This maximum is per account and per Region.

    CloudformationResource: AWS::CloudFormation::ResourceVersion

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-resourceversion.html

    ExampleMetadata: fixture=_generated

    Constructors

    CfnResourceVersion(Construct, string, ICfnResourceVersionProps)

    Create a new AWS::CloudFormation::ResourceVersion.

    public CfnResourceVersion(Construct scope, string id, ICfnResourceVersionProps props)

    Parameters

    scope Construct
    • scope in which this resource is defined.
    id string
    • scoped id of the resource.
    props ICfnResourceVersionProps
    • resource properties.

    Properties

    AttrArn

    The Amazon Resource Name (ARN) of the resource version.

    public virtual string AttrArn { get; }

    Property Value

    string

    Remarks

    CloudformationAttribute: Arn

    AttrIsDefaultVersion

    Whether the resource version is set as the default version.

    public virtual IResolvable AttrIsDefaultVersion { get; }

    Property Value

    IResolvable

    Remarks

    CloudformationAttribute: IsDefaultVersion

    AttrProvisioningType

    The provisioning behavior of the resource type.

    public virtual string AttrProvisioningType { get; }

    Property Value

    string

    Remarks

    CloudFormation determines the provisioning type during registration, based on the types of handlers in the schema handler package submitted.

    Valid values include:

      CloudformationAttribute: ProvisioningType

      AttrTypeArn

      The Amazon Resource Name (ARN) of the resource.

      public virtual string AttrTypeArn { get; }

      Property Value

      string

      Remarks

      CloudformationAttribute: TypeArn

      AttrVersionId

      The ID of a specific version of the resource.

      public virtual string AttrVersionId { get; }

      Property Value

      string

      Remarks

      The version ID is the value at the end of the Amazon Resource Name (ARN) assigned to the resource version when it is registered.

      CloudformationAttribute: VersionId

      AttrVisibility

      The scope at which the resource is visible and usable in CloudFormation operations.

      public virtual string AttrVisibility { get; }

      Property Value

      string

      Remarks

      Valid values include:

        CloudformationAttribute: Visibility

        CFN_RESOURCE_TYPE_NAME

        The CloudFormation resource type name for this resource class.

        public static string CFN_RESOURCE_TYPE_NAME { get; }

        Property Value

        string

        CfnProperties

        protected override IDictionary<string, object> CfnProperties { get; }

        Property Value

        IDictionary<string, object>

        ExecutionRoleArn

        The Amazon Resource Name (ARN) of the IAM role for CloudFormation to assume when invoking the resource.

        public virtual string? ExecutionRoleArn { get; set; }

        Property Value

        string

        Remarks

        If your resource calls AWS APIs in any of its handlers, you must create an IAM execution role that includes the necessary permissions to call those AWS APIs, and provision that execution role in your account. When CloudFormation needs to invoke the resource type handler, CloudFormation assumes this execution role to create a temporary session token, which it then passes to the resource type handler, thereby supplying your resource type with the appropriate credentials.

        Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-resourceversion.html#cfn-cloudformation-resourceversion-executionrolearn

        LoggingConfig

        Logging configuration information for a resource.

        public virtual object? LoggingConfig { get; set; }

        Property Value

        object

        Remarks

        SchemaHandlerPackage

        A URL to the S3 bucket containing the resource project package that contains the necessary files for the resource you want to register.

        public virtual string SchemaHandlerPackage { get; set; }

        Property Value

        string

        Remarks

        For information on generating a schema handler package for the resource you want to register, see submit in the CloudFormation CLI User Guide .

        The user registering the resource must be able to access the package in the S3 bucket. That is, the user needs to have <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> permissions for the schema handler package. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazons3.html">Actions, Resources, and Condition Keys for Amazon S3</a> in the <em>AWS Identity and Access Management User Guide</em> .
        

        Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-resourceversion.html#cfn-cloudformation-resourceversion-schemahandlerpackage

        TypeName

        The name of the resource being registered.

        public virtual string TypeName { get; set; }

        Property Value

        string

        Remarks

        We recommend that resource names adhere to the following pattern: company_or_organization :: service :: type .

        The following organization namespaces are reserved and can't be used in your resource names:
        

          Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-resourceversion.html#cfn-cloudformation-resourceversion-typename

          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 IDictionary<string, object>

          Returns

          IDictionary<string, object>