CreateExtensionAssociation - Amazon AppConfig
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

CreateExtensionAssociation

When you create an extension or configure an Amazon authored extension, you associate the extension with an Amazon AppConfig application, environment, or configuration profile. For example, you can choose to run the Amazon AppConfig deployment events to Amazon SNS Amazon authored extension and receive notifications on an Amazon SNS topic anytime a configuration deployment is started for a specific application. Defining which extension to associate with an Amazon AppConfig resource is called an extension association. An extension association is a specified relationship between an extension and an Amazon AppConfig resource, such as an application or a configuration profile. For more information about extensions and associations, see Extending workflows in the Amazon AppConfig User Guide.

Request Syntax

POST /extensionassociations HTTP/1.1 Content-type: application/json { "ExtensionIdentifier": "string", "ExtensionVersionNumber": number, "Parameters": { "string" : "string" }, "ResourceIdentifier": "string", "Tags": { "string" : "string" } }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

ExtensionIdentifier

The name, the ID, or the Amazon Resource Name (ARN) of the extension.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Required: Yes

ExtensionVersionNumber

The version number of the extension. If not specified, Amazon AppConfig uses the maximum version of the extension.

Type: Integer

Required: No

Parameters

The parameter names and values defined in the extensions. Extension parameters marked Required must be entered for this field.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 10 items.

Key Pattern: ^[^\/#:\n]{1,64}$

Value Length Constraints: Minimum length of 1. Maximum length of 2048.

Required: No

ResourceIdentifier

The ARN of an application, configuration profile, or environment.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Required: Yes

Tags

Adds one or more tags for the specified extension association. Tags are metadata that help you categorize resources in different ways, for example, by purpose, owner, or environment. Each tag consists of a key and an optional value, both of which you define.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Value Length Constraints: Maximum length of 256.

Required: No

Response Syntax

HTTP/1.1 201 Content-type: application/json { "Arn": "string", "ExtensionArn": "string", "ExtensionVersionNumber": number, "Id": "string", "Parameters": { "string" : "string" }, "ResourceArn": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in JSON format by the service.

Arn

The system-generated Amazon Resource Name (ARN) for the extension.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Pattern: arn:(aws[a-zA-Z-]*)?:[a-z]+:([a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1})?:(\d{12})?:[a-zA-Z0-9-_/:.]+

ExtensionArn

The ARN of the extension defined in the association.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Pattern: arn:(aws[a-zA-Z-]*)?:[a-z]+:([a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1})?:(\d{12})?:[a-zA-Z0-9-_/:.]+

ExtensionVersionNumber

The version number for the extension defined in the association.

Type: Integer

Id

The system-generated ID for the association.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Parameters

The parameter names and values defined in the association.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 10 items.

Key Pattern: ^[^\/#:\n]{1,64}$

Value Length Constraints: Minimum length of 1. Maximum length of 2048.

ResourceArn

The ARNs of applications, configuration profiles, or environments defined in the association.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Pattern: arn:(aws[a-zA-Z-]*)?:[a-z]+:([a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1})?:(\d{12})?:[a-zA-Z0-9-_/:.]+

Errors

For information about the errors that are common to all actions, see Common Errors.

BadRequestException

The input fails to satisfy the constraints specified by an Amazon service.

HTTP Status Code: 400

InternalServerException

There was an internal failure in the Amazon AppConfig service.

HTTP Status Code: 500

ResourceNotFoundException

The requested resource could not be found.

HTTP Status Code: 404

ServiceQuotaExceededException

The number of one more Amazon AppConfig resources exceeds the maximum allowed. Verify that your environment doesn't exceed the following service quotas:

Applications: 100 max

Deployment strategies: 20 max

Configuration profiles: 100 max per application

Environments: 20 max per application

To resolve this issue, you can delete one or more resources and try again. Or, you can request a quota increase. For more information about quotas and to request an increase, see Service quotas for Amazon AppConfig in the Amazon Web Services General Reference.

HTTP Status Code: 402

Examples

Example

This example illustrates one usage of CreateExtensionAssociation.

Sample Request

POST /extensionassociations HTTP/1.1 Host: appconfig.us-west-2.amazonaws.com Accept-Encoding: identity Content-Type: application/json User-Agent: aws-cli/2.7.19 Python/3.9.11 Windows/10 exe/AMD64 prompt/off command/appconfig.create-extension-association X-Amz-Date: 20220803T214332Z Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20220803/us-west-2/appconfig/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=39c3b3042cd2aEXAMPLE Content-Length: 180 {"ExtensionIdentifier": "my-test-extension", "ResourceIdentifier": "arn:aws:appconfig:us-west-2:111122223333:application/xlmtExample", "Parameters": {"MyParamKey": "MyParamValue"}}

Sample Response

{ "Arn": null, "ExtensionArn": "arn:aws:appconfig:us-west-2:111122223333:extension/6czatq1/1", "ExtensionVersionNumber": 1, "Id": "rnekru4", "Parameters": { "MyParamKey": "MyParamValue" }, "ResourceArn": "arn:aws:appconfig:us-west-2:111122223333:application/xlmtExample" }

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: