Skip to content

create_platform_version

create_platform_version(
    platform_name: PlatformName,
    platform_version: PlatformVersion,
    platform_definition_bundle: S3Location,
    *,
    config_overrides: Optional[ElasticBeanstalkClientConfig] = None,
    environment_name: Optional[EnvironmentName] = None,
    option_settings: Optional[ConfigurationOptionSettingsList] = None,
    tags: Optional[Tags] = None,
) -> CreatePlatformVersionResult

Create a new version of your custom platform.

Parameters:

  • platform_name (PlatformName) –

    The name of your custom platform.

  • platform_version (PlatformVersion) –

    The number, such as 1.0.2, for the new platform version.

  • platform_definition_bundle (S3Location) –

    The location of the platform definition archive in Amazon S3.

  • environment_name (Optional[EnvironmentName], default: None ) –

    The name of the builder environment.

  • option_settings (Optional[ConfigurationOptionSettingsList], default: None ) –

    The configuration option settings to apply to the builder environment.

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

    Specifies the tags applied to the new platform version.

    Elastic Beanstalk applies these tags only to the platform version. Environments that you create using the platform version don't inherit the tags.

Raises:

Source code in docs_src/capo_elastic_beanstalk/_services/elastic_beanstalk.py
def create_platform_version(
    self,
    platform_name: "capo_elastic_beanstalk.types.platform_name.PlatformName",
    platform_version: "capo_elastic_beanstalk.types.platform_version.PlatformVersion",
    platform_definition_bundle: "capo_elastic_beanstalk.types.s3_location.S3Location",
    *,
    config_overrides: Optional[ElasticBeanstalkClientConfig] = None,
    environment_name: Optional[
        "capo_elastic_beanstalk.types.environment_name.EnvironmentName"
    ] = None,
    option_settings: Optional[
        "capo_elastic_beanstalk.types.configuration_option_settings_list.ConfigurationOptionSettingsList"
    ] = None,
    tags: Optional["capo_elastic_beanstalk.types.tags.Tags"] = None,
) -> "capo_elastic_beanstalk.types.create_platform_version_result.CreatePlatformVersionResult":
    """<p>Create a new version of your custom platform.</p>

    Args:
        platform_name: <p>The name of your custom platform.</p>
        platform_version: <p>The number, such as 1.0.2, for the new platform version.</p>
        platform_definition_bundle: <p>The location of the platform definition archive in Amazon S3.</p>
        environment_name: <p>The name of the builder environment.</p>
        option_settings: <p>The configuration option settings to apply to the builder environment.</p>
        tags: <p>Specifies the tags applied to the new platform version.</p> <p>Elastic Beanstalk applies these tags only to the platform version. Environments that you create using the platform version don't inherit the tags.</p>

    Raises:
        capo_elastic_beanstalk.errors.elastic_beanstalk_service_exception.ElasticBeanstalkServiceException: <p>A generic service exception has occurred.</p>
        capo_elastic_beanstalk.errors.insufficient_privileges_exception.InsufficientPrivilegesException: <p>The specified account does not have sufficient privileges for one or more Amazon Web Services services.</p>
        capo_elastic_beanstalk.errors.too_many_platforms_exception.TooManyPlatformsException: <p>You have exceeded the maximum number of allowed platforms associated with the account.</p>
        capo_elastic_beanstalk.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_elastic_beanstalk.types.create_platform_version_request.CreatePlatformVersionRequest]",
    ) -> OperationResponse[
        "capo_elastic_beanstalk.types.create_platform_version_result.CreatePlatformVersionResult"
    ]:
        import capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.create_platform_version

        output, http_response = (
            capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.create_platform_version.create_platform_version(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreatePlatformVersion")
    )
    input_: capo_elastic_beanstalk.types.create_platform_version_request.CreatePlatformVersionRequest = {
        "platform_name": platform_name,
        "platform_version": platform_version,
        "platform_definition_bundle": platform_definition_bundle,
    }
    if environment_name is not None:
        input_["environment_name"] = environment_name
    if option_settings is not None:
        input_["option_settings"] = option_settings
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output