Skip to content

create_extension async

create_extension(
    name: ExtensionOrParameterName,
    actions: ActionsMap,
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
    description: Optional[Description] = None,
    parameters: Optional[ParameterMap] = None,
    tags: Optional[TagMap] = None,
    latest_version_number: Optional[Integer] = None,
) -> Extension

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 an AppConfig extension that uses Lambda, you must create a Lambda function to perform any computation and processing defined in the extension. If you plan to create custom versions of the Amazon Web Services authored notification extensions, you only need to specify an Amazon Resource Name (ARN) in the Uri field for the new extension version.

  • For a custom EventBridge notification extension, enter the ARN of the EventBridge default events in the Uri field.

  • For a custom Amazon SNS notification extension, enter the ARN of an Amazon SNS topic in the Uri field.

  • For a custom Amazon SQS notification extension, enter the ARN of an Amazon SQS message queue in the Uri field.

For more information about extensions, see Extending workflows in the AppConfig User Guide.

Parameters:

  • name (ExtensionOrParameterName) –

    A name for the extension. Each extension name in your account must be unique. Extension versions use the same name.

  • description (Optional[Description], default: None ) –

    Information about the extension.

  • actions (ActionsMap) –

    The actions defined in the extension.

  • parameters (Optional[ParameterMap], default: None ) –

    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.

  • tags (Optional[TagMap], default: None ) –

    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.

  • latest_version_number (Optional[Integer], default: None ) –

    You can omit this field when you create an extension. When you create a new version, specify the most recent current version number. For example, you create version 3, enter 2 for this field.

Raises:

  • BadRequestException –

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

  • ConflictException –

    The request could not be processed because of conflict in the current state of the resource.

  • InternalServerException –

    There was an internal failure in the AppConfig service.

  • ServiceQuotaExceededException –

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

    Applications: 100 max

    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 AppConfig in the Amazon Web Services General Reference.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_appconfig/_services/async_app_config.py
async def create_extension(
    self,
    name: "capo_appconfig.types.extension_or_parameter_name.ExtensionOrParameterName",
    actions: "capo_appconfig.types.actions_map.ActionsMap",
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
    description: Optional["capo_appconfig.types.description.Description"] = None,
    parameters: Optional["capo_appconfig.types.parameter_map.ParameterMap"] = None,
    tags: Optional["capo_appconfig.types.tag_map.TagMap"] = None,
    latest_version_number: Optional["capo_appconfig.types.integer.Integer"] = None,
) -> "capo_appconfig.types.extension.Extension":
    """<p>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.</p> <p>You can create your own extensions or use the Amazon Web Services authored extensions provided by AppConfig. For an AppConfig extension that uses Lambda, you must create a Lambda function to perform any computation and processing defined in the extension. If you plan to create custom versions of the Amazon Web Services authored notification extensions, you only need to specify an Amazon Resource Name (ARN) in the <code>Uri</code> field for the new extension version.</p> <ul> <li> <p>For a custom EventBridge notification extension, enter the ARN of the EventBridge default events in the <code>Uri</code> field.</p> </li> <li> <p>For a custom Amazon SNS notification extension, enter the ARN of an Amazon SNS topic in the <code>Uri</code> field.</p> </li> <li> <p>For a custom Amazon SQS notification extension, enter the ARN of an Amazon SQS message queue in the <code>Uri</code> field. </p> </li> </ul> <p>For more information about extensions, see <a href="https://docs.aws.amazon.com/appconfig/latest/userguide/working-with-appconfig-extensions.html">Extending workflows</a> in the <i>AppConfig User Guide</i>.</p>

    Args:
        name: <p>A name for the extension. Each extension name in your account must be unique. Extension versions use the same name.</p>
        description: <p>Information about the extension.</p>
        actions: <p>The actions defined in the extension.</p>
        parameters: <p>The parameters accepted by the extension. You specify parameter values when you associate the extension to an AppConfig resource by using the <code>CreateExtensionAssociation</code> API action. For Lambda extension actions, these parameters are included in the Lambda request object.</p>
        tags: <p>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. </p>
        latest_version_number: <p>You can omit this field when you create an extension. When you create a new version, specify the most recent current version number. For example, you create version 3, enter 2 for this field.</p>

    Raises:
        capo_appconfig.errors.bad_request_exception.BadRequestException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_appconfig.errors.conflict_exception.ConflictException: <p>The request could not be processed because of conflict in the current state of the resource.</p>
        capo_appconfig.errors.internal_server_exception.InternalServerException: <p>There was an internal failure in the AppConfig service.</p>
        capo_appconfig.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The number of one more AppConfig resources exceeds the maximum allowed. Verify that your environment doesn't exceed the following service quotas:</p> <p>Applications: 100 max</p> <p>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 <a href="https://docs.aws.amazon.com/general/latest/gr/appconfig.html#limits_appconfig">Service quotas for AppConfig</a> in the Amazon Web Services General Reference.</p>
        capo_appconfig.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appconfig.types.create_extension_request.CreateExtensionRequest]",
    ) -> AsyncOperationResponse["capo_appconfig.types.extension.Extension"]:
        import capo_appconfig._operations.amazon_app_config.create_extension

        (
            output,
            http_response,
        ) = await capo_appconfig._operations.amazon_app_config.create_extension.async_create_extension(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateExtension")
    )
    input_: capo_appconfig.types.create_extension_request.CreateExtensionRequest = {
        "name": name,
        "actions": actions,
    }
    if description is not None:
        input_["description"] = description
    if parameters is not None:
        input_["parameters"] = parameters
    if tags is not None:
        input_["tags"] = tags
    if latest_version_number is not None:
        input_["latest_version_number"] = latest_version_number

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output