Skip to content

start_configuration_session async

start_configuration_session(
    application_identifier: Identifier,
    environment_identifier: Identifier,
    configuration_profile_identifier: Identifier,
    *,
    config_overrides: Optional[AsyncAppConfigDataClientConfig] = None,
    required_minimum_poll_interval_in_seconds: Optional[OptionalPollSeconds] = None,
) -> StartConfigurationSessionResponse

Starts a configuration session used to retrieve a deployed configuration. For more information about this API action and to view example CLI commands that show how to use it with the GetLatestConfiguration API action, see Retrieving the configuration in the AppConfig User Guide.

Parameters:

  • application_identifier (Identifier) –

    The application ID or the application name.

  • environment_identifier (Identifier) –

    The environment ID or the environment name.

  • configuration_profile_identifier (Identifier) –

    The configuration profile ID or the configuration profile name.

  • required_minimum_poll_interval_in_seconds (Optional[OptionalPollSeconds], default: None ) –

    Sets a constraint on a session. If you specify a value of, for example, 60 seconds, then the client that established the session can't call GetLatestConfiguration more frequently than every 60 seconds.

Raises:

Source code in docs_src/capo_appconfigdata/_services/async_app_config_data.py
async def start_configuration_session(
    self,
    application_identifier: "capo_appconfigdata.types.identifier.Identifier",
    environment_identifier: "capo_appconfigdata.types.identifier.Identifier",
    configuration_profile_identifier: "capo_appconfigdata.types.identifier.Identifier",
    *,
    config_overrides: Optional[AsyncAppConfigDataClientConfig] = None,
    required_minimum_poll_interval_in_seconds: Optional[
        "capo_appconfigdata.types.optional_poll_seconds.OptionalPollSeconds"
    ] = None,
) -> "capo_appconfigdata.types.start_configuration_session_response.StartConfigurationSessionResponse":
    """<p>Starts a configuration session used to retrieve a deployed configuration. For more information about this API action and to view example CLI commands that show how to use it with the <a>GetLatestConfiguration</a> API action, see <a href="http://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-retrieving-the-configuration">Retrieving the configuration</a> in the <i>AppConfig User Guide</i>. </p>

    Args:
        application_identifier: <p>The application ID or the application name.</p>
        environment_identifier: <p>The environment ID or the environment name.</p>
        configuration_profile_identifier: <p>The configuration profile ID or the configuration profile name.</p>
        required_minimum_poll_interval_in_seconds: <p>Sets a constraint on a session. If you specify a value of, for example, 60 seconds, then the client that established the session can't call <a>GetLatestConfiguration</a> more frequently than every 60 seconds.</p>

    Raises:
        capo_appconfigdata.errors.bad_request_exception.BadRequestException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_appconfigdata.errors.internal_server_exception.InternalServerException: <p>There was an internal failure in the service.</p>
        capo_appconfigdata.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
        capo_appconfigdata.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_appconfigdata.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appconfigdata.types.start_configuration_session_request.StartConfigurationSessionRequest]",
    ) -> AsyncOperationResponse[
        "capo_appconfigdata.types.start_configuration_session_response.StartConfigurationSessionResponse"
    ]:
        import capo_appconfigdata._operations.app_config_data.start_configuration_session

        (
            output,
            http_response,
        ) = await capo_appconfigdata._operations.app_config_data.start_configuration_session.async_start_configuration_session(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartConfigurationSession")
    )
    input_: capo_appconfigdata.types.start_configuration_session_request.StartConfigurationSessionRequest = {
        "application_identifier": application_identifier,
        "environment_identifier": environment_identifier,
        "configuration_profile_identifier": configuration_profile_identifier,
    }
    if required_minimum_poll_interval_in_seconds is not None:
        input_["required_minimum_poll_interval_in_seconds"] = (
            required_minimum_poll_interval_in_seconds
        )

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