Skip to content

get_account_setting async

get_account_setting(
    name: AccountSettingName, *, config_overrides: Optional[AsyncECRClientConfig] = None
) -> GetAccountSettingResponse

Retrieves the account setting value for the specified setting name.

Parameters:

  • name (AccountSettingName) –

    The name of the account setting, such as BASIC_SCAN_TYPE_VERSION, REGISTRY_POLICY_SCOPE, or BLOB_MOUNTING.

Raises:

Source code in docs_src/capo_ecr/_services/async_ecr.py
async def get_account_setting(
    self,
    name: "capo_ecr.types.account_setting_name.AccountSettingName",
    *,
    config_overrides: Optional[AsyncECRClientConfig] = None,
) -> "capo_ecr.types.get_account_setting_response.GetAccountSettingResponse":
    """<p>Retrieves the account setting value for the specified setting name.</p>

    Args:
        name: <p>The name of the account setting, such as <code>BASIC_SCAN_TYPE_VERSION</code>, <code>REGISTRY_POLICY_SCOPE</code>, or <code>BLOB_MOUNTING</code>.</p>

    Raises:
        capo_ecr.errors.invalid_parameter_exception.InvalidParameterException: <p>The specified parameter is invalid. Review the available parameters for the API request.</p>
        capo_ecr.errors.server_exception.ServerException: <p>These errors are usually caused by a server-side issue.</p>
        capo_ecr.errors.validation_exception.ValidationException: <p>There was an exception validating this request.</p>
        capo_ecr.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ecr.types.get_account_setting_request.GetAccountSettingRequest]",
    ) -> AsyncOperationResponse[
        "capo_ecr.types.get_account_setting_response.GetAccountSettingResponse"
    ]:
        import capo_ecr._operations.amazon_ec2_container_registry_v20150921.get_account_setting

        (
            output,
            http_response,
        ) = await capo_ecr._operations.amazon_ec2_container_registry_v20150921.get_account_setting.async_get_account_setting(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetAccountSetting")
    )
    input_: capo_ecr.types.get_account_setting_request.GetAccountSettingRequest = {
        "name": name
    }

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