Skip to content

publish_type async

publish_type(
    *,
    config_overrides: Optional[AsyncCloudFormationClientConfig] = None,
    type: Optional[ThirdPartyType] = None,
    arn: Optional[PrivateTypeArn] = None,
    type_name: Optional[TypeName] = None,
    public_version_number: Optional[PublicVersionNumber] = None,
) -> PublishTypeOutput

Publishes the specified extension to the CloudFormation registry as a public extension in this Region. Public extensions are available for use by all CloudFormation users. For more information about publishing extensions, see Publishing extensions to make them available for public use in the CloudFormation Command Line Interface (CLI) User Guide.

To publish an extension, you must be registered as a publisher with CloudFormation. For more information, see RegisterPublisher.

Parameters:

  • type (Optional[ThirdPartyType], default: None ) –

    The type of the extension.

    Conditional: You must specify Arn, or TypeName and Type.

  • arn (Optional[PrivateTypeArn], default: None ) –

    The Amazon Resource Name (ARN) of the extension.

    Conditional: You must specify Arn, or TypeName and Type.

  • type_name (Optional[TypeName], default: None ) –

    The name of the extension.

    Conditional: You must specify Arn, or TypeName and Type.

  • public_version_number (Optional[PublicVersionNumber], default: None ) –

    The version number to assign to this version of the extension.

    Use the following format, and adhere to semantic versioning when assigning a version number to your extension:

    MAJOR.MINOR.PATCH

    For more information, see Semantic Versioning 2.0.0.

    If you don't specify a version number, CloudFormation increments the version number by one minor version release.

    You cannot specify a version number the first time you publish a type. CloudFormation automatically sets the first version number to be 1.0.0.

Raises:

Source code in docs_src/capo_cloudformation/_services/async_cloud_formation.py
async def publish_type(
    self,
    *,
    config_overrides: Optional[AsyncCloudFormationClientConfig] = None,
    type: Optional[
        "capo_cloudformation.types.third_party_type.ThirdPartyType"
    ] = None,
    arn: Optional[
        "capo_cloudformation.types.private_type_arn.PrivateTypeArn"
    ] = None,
    type_name: Optional["capo_cloudformation.types.type_name.TypeName"] = None,
    public_version_number: Optional[
        "capo_cloudformation.types.public_version_number.PublicVersionNumber"
    ] = None,
) -> "capo_cloudformation.types.publish_type_output.PublishTypeOutput":
    """<p>Publishes the specified extension to the CloudFormation registry as a public extension in this Region. Public extensions are available for use by all CloudFormation users. For more information about publishing extensions, see <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/publish-extension.html">Publishing extensions to make them available for public use</a> in the <i>CloudFormation Command Line Interface (CLI) User Guide</i>.</p> <p>To publish an extension, you must be registered as a publisher with CloudFormation. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_RegisterPublisher.html">RegisterPublisher</a>.</p>

    Args:
        type: <p>The type of the extension.</p> <p>Conditional: You must specify <code>Arn</code>, or <code>TypeName</code> and <code>Type</code>.</p>
        arn: <p>The Amazon Resource Name (ARN) of the extension.</p> <p>Conditional: You must specify <code>Arn</code>, or <code>TypeName</code> and <code>Type</code>.</p>
        type_name: <p>The name of the extension.</p> <p>Conditional: You must specify <code>Arn</code>, or <code>TypeName</code> and <code>Type</code>.</p>
        public_version_number: <p>The version number to assign to this version of the extension.</p> <p>Use the following format, and adhere to semantic versioning when assigning a version number to your extension:</p> <p> <code>MAJOR.MINOR.PATCH</code> </p> <p>For more information, see <a href="https://semver.org/">Semantic Versioning 2.0.0</a>.</p> <p>If you don't specify a version number, CloudFormation increments the version number by one minor version release.</p> <p>You cannot specify a version number the first time you publish a type. CloudFormation automatically sets the first version number to be <code>1.0.0</code>.</p>

    Raises:
        capo_cloudformation.errors.cfn_registry_exception.CFNRegistryException: <p>An error occurred during a CloudFormation registry operation.</p>
        capo_cloudformation.errors.type_not_found_exception.TypeNotFoundException: <p>The specified extension doesn't exist in the CloudFormation registry.</p>
        capo_cloudformation.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudformation.types.publish_type_input.PublishTypeInput]",
    ) -> AsyncOperationResponse[
        "capo_cloudformation.types.publish_type_output.PublishTypeOutput"
    ]:
        import capo_cloudformation._operations.cloud_formation.publish_type

        (
            output,
            http_response,
        ) = await capo_cloudformation._operations.cloud_formation.publish_type.async_publish_type(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PublishType")
    )
    input_: capo_cloudformation.types.publish_type_input.PublishTypeInput = {}
    if type is not None:
        input_["type"] = type
    if arn is not None:
        input_["arn"] = arn
    if type_name is not None:
        input_["type_name"] = type_name
    if public_version_number is not None:
        input_["public_version_number"] = public_version_number

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