Skip to content

start_deployment

start_deployment(
    application_id: Name,
    environment_id: Name,
    deployment_strategy_id: DeploymentStrategyId,
    configuration_profile_id: LongName,
    configuration_version: Version,
    *,
    config_overrides: Optional[AppConfigClientConfig] = None,
    description: Optional[Description] = None,
    tags: Optional[TagMap] = None,
    kms_key_identifier: Optional[KmsKeyIdentifier] = None,
    dynamic_extension_parameters: Optional[DynamicParameterMap] = None,
    latest_deployment_number: Optional[Integer] = None,
) -> Deployment

Starts a deployment.

AppConfig Agent supports deploying feature flag or free-form configuration data to specific segments or individual users during a gradual rollout. Entity-based gradual deployments ensure that once a user or segment receives a configuration version, they continue to receive that same version throughout the deployment period, regardless of which compute resource serves their requests. For more information, see Using AppConfig Agent for user-based or entity-based gradual deployments

Parameters:

  • application_id (Name) –

    The application ID.

  • environment_id (Name) –

    The environment ID.

  • deployment_strategy_id (DeploymentStrategyId) –

    The deployment strategy ID.

  • configuration_profile_id (LongName) –

    The configuration profile ID.

  • configuration_version (Version) –

    The configuration version to deploy. If deploying an AppConfig hosted configuration version, you can specify either the version number or version label. For all other configurations, you must specify the version number.

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

    A description of the deployment.

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

    Metadata to assign to the deployment. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define.

  • kms_key_identifier (Optional[KmsKeyIdentifier], default: None ) –

    The KMS key identifier (key ID, key alias, or key ARN). AppConfig uses this ID to encrypt the configuration data using a customer managed key.

  • dynamic_extension_parameters (Optional[DynamicParameterMap], default: None ) –

    A map of dynamic extension parameter names to values to pass to associated extensions with PRE_START_DEPLOYMENT actions.

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

    The number of the latest deployment. Use this value to ensure that the deployment starts from the expected state and to prevent conflicting updates.

Raises:

Source code in docs_src/capo_appconfig/_services/app_config.py
def start_deployment(
    self,
    application_id: "capo_appconfig.types.name.Name",
    environment_id: "capo_appconfig.types.name.Name",
    deployment_strategy_id: "capo_appconfig.types.deployment_strategy_id.DeploymentStrategyId",
    configuration_profile_id: "capo_appconfig.types.long_name.LongName",
    configuration_version: "capo_appconfig.types.version.Version",
    *,
    config_overrides: Optional[AppConfigClientConfig] = None,
    description: Optional["capo_appconfig.types.description.Description"] = None,
    tags: Optional["capo_appconfig.types.tag_map.TagMap"] = None,
    kms_key_identifier: Optional[
        "capo_appconfig.types.kms_key_identifier.KmsKeyIdentifier"
    ] = None,
    dynamic_extension_parameters: Optional[
        "capo_appconfig.types.dynamic_parameter_map.DynamicParameterMap"
    ] = None,
    latest_deployment_number: Optional[
        "capo_appconfig.types.integer.Integer"
    ] = None,
) -> "capo_appconfig.types.deployment.Deployment":
    """<p>Starts a deployment.</p> <note> <p>AppConfig Agent supports deploying feature flag or free-form configuration data to specific segments or individual users during a gradual rollout. Entity-based gradual deployments ensure that once a user or segment receives a configuration version, they continue to receive that same version throughout the deployment period, regardless of which compute resource serves their requests. For more information, see <a href="https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-agent-how-to-use.html#appconfig-entity-based-gradual-deployments">Using AppConfig Agent for user-based or entity-based gradual deployments</a> </p> </note>

    Args:
        application_id: <p>The application ID.</p>
        environment_id: <p>The environment ID.</p>
        deployment_strategy_id: <p>The deployment strategy ID.</p>
        configuration_profile_id: <p>The configuration profile ID.</p>
        configuration_version: <p>The configuration version to deploy. If deploying an AppConfig hosted configuration version, you can specify either the version number or version label. For all other configurations, you must specify the version number.</p>
        description: <p>A description of the deployment.</p>
        tags: <p>Metadata to assign to the deployment. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define.</p>
        kms_key_identifier: <p>The KMS key identifier (key ID, key alias, or key ARN). AppConfig uses this ID to encrypt the configuration data using a customer managed key. </p>
        dynamic_extension_parameters: <p>A map of dynamic extension parameter names to values to pass to associated extensions with <code>PRE_START_DEPLOYMENT</code> actions.</p>
        latest_deployment_number: <p>The number of the latest deployment. Use this value to ensure that the deployment starts from the expected state and to prevent conflicting updates.</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.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
        capo_appconfig.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_appconfig.types.start_deployment_request.StartDeploymentRequest]",
    ) -> OperationResponse["capo_appconfig.types.deployment.Deployment"]:
        import capo_appconfig._operations.amazon_app_config.start_deployment

        output, http_response = (
            capo_appconfig._operations.amazon_app_config.start_deployment.start_deployment(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_appconfig.types.start_deployment_request.StartDeploymentRequest",
    ) -> dict[str, Any]:
        import capo_appconfig.types.start_deployment_request

        return capo_appconfig.types.start_deployment_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("StartDeployment", redact_input=_redact_input),
    )
    input_: capo_appconfig.types.start_deployment_request.StartDeploymentRequest = {
        "application_id": application_id,
        "environment_id": environment_id,
        "deployment_strategy_id": deployment_strategy_id,
        "configuration_profile_id": configuration_profile_id,
        "configuration_version": configuration_version,
    }
    if description is not None:
        input_["description"] = description
    if tags is not None:
        input_["tags"] = tags
    if kms_key_identifier is not None:
        input_["kms_key_identifier"] = kms_key_identifier
    if dynamic_extension_parameters is not None:
        input_["dynamic_extension_parameters"] = dynamic_extension_parameters
    if latest_deployment_number is not None:
        input_["latest_deployment_number"] = latest_deployment_number

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