create_extension
(**kwargs)¶Creates an AppConfig extension. An extension augments your ability to inject logic or behavior at different points during the AppConfig workflow of creating or deploying a configuration.
You can create your own extensions or use the Amazon Web Services authored extensions provided by AppConfig. For most use cases, to create your own extension, you must create an Lambda function to perform any computation and processing defined in the extension. For more information about extensions, see Working with AppConfig extensions in the AppConfig User Guide .
See also: AWS API Documentation
Request Syntax
response = client.create_extension(
Name='string',
Description='string',
Actions={
'string': [
{
'Name': 'string',
'Description': 'string',
'Uri': 'string',
'RoleArn': 'string'
},
]
},
Parameters={
'string': {
'Description': 'string',
'Required': True|False
}
},
Tags={
'string': 'string'
},
LatestVersionNumber=123
)
[REQUIRED]
A name for the extension. Each extension name in your account must be unique. Extension versions use the same name.
[REQUIRED]
The actions defined in the extension.
An action defines the tasks that the extension performs during the AppConfig workflow. Each action includes an action point such as ON_CREATE_HOSTED_CONFIGURATION
, PRE_DEPLOYMENT
, or ON_DEPLOYMENT
. Each action also includes a name, a URI to an Lambda function, and an Amazon Resource Name (ARN) for an Identity and Access Management assume role. You specify the name, URI, and ARN for each action point defined in the extension. You can specify the following actions for an extension:
PRE_CREATE_HOSTED_CONFIGURATION_VERSION
PRE_START_DEPLOYMENT
ON_DEPLOYMENT_START
ON_DEPLOYMENT_STEP
ON_DEPLOYMENT_BAKING
ON_DEPLOYMENT_COMPLETE
ON_DEPLOYMENT_ROLLED_BACK
The action name.
Information about the action.
The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.
An Amazon Resource Name (ARN) for an Identity and Access Management assume role.
The parameters accepted by the extension. You specify parameter values when you associate the extension to an AppConfig resource by using the CreateExtensionAssociation
API action. For Lambda extension actions, these parameters are included in the Lambda request object.
A value such as an Amazon Resource Name (ARN) or an Amazon Simple Notification Service topic entered in an extension when invoked. Parameter values are specified in an extension association. For more information about extensions, see Working with AppConfig extensions in the AppConfig User Guide .
Information about the parameter.
A parameter value must be specified in the extension association.
Adds one or more tags for the specified extension. 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.
dict
Response Syntax
{
'Id': 'string',
'Name': 'string',
'VersionNumber': 123,
'Arn': 'string',
'Description': 'string',
'Actions': {
'string': [
{
'Name': 'string',
'Description': 'string',
'Uri': 'string',
'RoleArn': 'string'
},
]
},
'Parameters': {
'string': {
'Description': 'string',
'Required': True|False
}
}
}
Response Structure
(dict) --
Id (string) --
The system-generated ID of the extension.
Name (string) --
The extension name.
VersionNumber (integer) --
The extension version number.
Arn (string) --
The system-generated Amazon Resource Name (ARN) for the extension.
Description (string) --
Information about the extension.
Actions (dict) --
The actions defined in the extension.
(string) --
(list) --
(dict) --
An action defines the tasks that the extension performs during the AppConfig workflow. Each action includes an action point such as ON_CREATE_HOSTED_CONFIGURATION
, PRE_DEPLOYMENT
, or ON_DEPLOYMENT
. Each action also includes a name, a URI to an Lambda function, and an Amazon Resource Name (ARN) for an Identity and Access Management assume role. You specify the name, URI, and ARN for each action point defined in the extension. You can specify the following actions for an extension:
PRE_CREATE_HOSTED_CONFIGURATION_VERSION
PRE_START_DEPLOYMENT
ON_DEPLOYMENT_START
ON_DEPLOYMENT_STEP
ON_DEPLOYMENT_BAKING
ON_DEPLOYMENT_COMPLETE
ON_DEPLOYMENT_ROLLED_BACK
Name (string) --
The action name.
Description (string) --
Information about the action.
Uri (string) --
The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.
RoleArn (string) --
An Amazon Resource Name (ARN) for an Identity and Access Management assume role.
Parameters (dict) --
The parameters accepted by the extension. You specify parameter values when you associate the extension to an AppConfig resource by using the CreateExtensionAssociation
API action. For Lambda extension actions, these parameters are included in the Lambda request object.
(string) --
(dict) --
A value such as an Amazon Resource Name (ARN) or an Amazon Simple Notification Service topic entered in an extension when invoked. Parameter values are specified in an extension association. For more information about extensions, see Working with AppConfig extensions in the AppConfig User Guide .
Description (string) --
Information about the parameter.
Required (boolean) --
A parameter value must be specified in the extension association.
Exceptions
AppConfig.Client.exceptions.BadRequestException
AppConfig.Client.exceptions.ConflictException
AppConfig.Client.exceptions.ServiceQuotaExceededException
AppConfig.Client.exceptions.InternalServerException