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/ecr.py
| def get_account_setting(
self,
name: "capo_ecr.types.account_setting_name.AccountSettingName",
*,
config_overrides: Optional[ECRClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_ecr.types.get_account_setting_request.GetAccountSettingRequest]",
) -> OperationResponse[
"capo_ecr.types.get_account_setting_response.GetAccountSettingResponse"
]:
import capo_ecr._operations.amazon_ec2_container_registry_v20150921.get_account_setting
output, http_response = (
capo_ecr._operations.amazon_ec2_container_registry_v20150921.get_account_setting.get_account_setting(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|