[ aws . cloudformation ]

register-type

Description

Registers an extension with the CloudFormation service. Registering an extension makes it available for use in CloudFormation templates in your Amazon Web Services account, and includes:

  • Validating the extension schema

  • Determining which handlers, if any, have been specified for the extension

  • Making the extension available for use in your account

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

You can have a maximum of 50 resource extension versions registered at a time. This maximum is per account and per region. Use DeregisterType to deregister specific extension versions if necessary.

Once you have initiated a registration request using `` RegisterType `` , you can use `` DescribeTypeRegistration `` to monitor the progress of the registration request.

Once you have registered a private extension in your account and region, use SetTypeConfiguration to specify configuration properties for the extension. For more information, see Configuring extensions at the account level in the CloudFormation User Guide .

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

Synopsis

  register-type
[--type <value>]
--type-name <value>
--schema-handler-package <value>
[--logging-config <value>]
[--execution-role-arn <value>]
[--client-request-token <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]

Options

--type (string)

The kind of extension.

Possible values:

  • RESOURCE

  • MODULE

--type-name (string)

The name of the extension being registered.

We recommend that extension names adhere to the following patterns:

  • For resource types, company_or_organization ::service ::type .

  • For modules, company_or_organization ::service ::type ::MODULE.

Note

The following organization namespaces are reserved and cannot be used in your extension names:

  • Alexa

  • AMZN

  • Amazon

  • AWS

  • Custom

  • Dev

--schema-handler-package (string)

A url to the S3 bucket containing the extension project package that contains the neccessary files for the extension you want to register.

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

Note

The user registering the extension must be able to access the package in the S3 bucket. That is, the user needs to have GetObject permissions for the schema handler package. For more information, see Actions, Resources, and Condition Keys for Amazon S3 in the Identity and Access Management User Guide .

--logging-config (structure)

Specifies logging configuration information for an extension.

LogRoleArn -> (string)

The ARN of the role that CloudFormation should assume when sending log entries to CloudWatch logs.

LogGroupName -> (string)

The Amazon CloudWatch log group to which CloudFormation sends error logging information when invoking the extension’s handlers.

Shorthand Syntax:

LogRoleArn=string,LogGroupName=string

JSON Syntax:

{
  "LogRoleArn": "string",
  "LogGroupName": "string"
}

--execution-role-arn (string)

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

For CloudFormation to assume the specified execution role, the role must contain a trust relationship with the CloudFormation service principle (resources.cloudformation.amazonaws.com ). For more information on adding trust relationships, see Modifying a role trust policy in the Identity and Access Management User Guide .

If your extension calls Amazon Web Services APIs in any of its handlers, you must create an * IAM execution role * that includes the necessary permissions to call those Amazon Web Services 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.

--client-request-token (string)

A unique identifier that acts as an idempotency key for this registration request. Specifying a client request token prevents CloudFormation from generating more than one version of an extension from the same registeration request, even if the request is submitted multiple times.

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See ‘aws help’ for descriptions of global parameters.

Examples

To register a resource type

The following register-type example registers the specified resource type as a private resource type in the user’s account.

aws cloudformation register-type \
    --type-name My::Organization::ResourceName \
    --schema-handler-package s3://bucket_name/my-organization-resource_name.zip \
    --type RESOURCE

Output:

{
    "RegistrationToken": "f5525280-104e-4d35-bef5-8f1f1example"
}

For more information, see Registering Resource Providers in the CloudFormation Command Line Interface User Guide for Type Development.

Output

RegistrationToken -> (string)

The identifier for this registration request.

Use this registration token when calling `` DescribeTypeRegistration `` , which returns information about the status and IDs of the extension registration.