Returns the details of one or more retention configurations. If the retention configuration name is not specified, this operation returns the details for all the retention configurations for that account.
Currently, Config supports only one retention configuration per region in your account.
Parameters:
-
retention_configuration_names
(Optional[RetentionConfigurationNameList], default:
None
)
–
A list of names of retention configurations for which you want details. If you do not specify a name, Config returns details for all the retention configurations for that account.
Currently, Config supports only one retention configuration per region in your account.
-
next_token
(Optional[NextToken], default:
None
)
–
The nextToken string returned on a previous page that you use to get the next page of results in a paginated response.
Raises:
Source code in docs_src/capo_config_service/_services/config_service.py
| def describe_retention_configurations(
self,
*,
config_overrides: Optional[ConfigServiceClientConfig] = None,
retention_configuration_names: Optional[
"capo_config_service.types.retention_configuration_name_list.RetentionConfigurationNameList"
] = None,
next_token: Optional["capo_config_service.types.next_token.NextToken"] = None,
) -> "capo_config_service.types.describe_retention_configurations_response.DescribeRetentionConfigurationsResponse":
"""<p>Returns the details of one or more retention configurations. If the retention configuration name is not specified, this operation returns the details for all the retention configurations for that account.</p> <note> <p>Currently, Config supports only one retention configuration per region in your account.</p> </note>
Args:
retention_configuration_names: <p>A list of names of retention configurations for which you want details. If you do not specify a name, Config returns details for all the retention configurations for that account.</p> <note> <p>Currently, Config supports only one retention configuration per region in your account.</p> </note>
next_token: <p>The <code>nextToken</code> string returned on a previous page that you use to get the next page of results in a paginated response. </p>
Raises:
capo_config_service.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The specified next token is not valid. Specify the <code>nextToken</code> string that was returned in the previous response to get the next page of results.</p>
capo_config_service.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One or more of the specified parameters are not valid. Verify that your parameters are valid and try again.</p>
capo_config_service.errors.no_such_retention_configuration_exception.NoSuchRetentionConfigurationException: <p>You have specified a retention configuration that does not exist.</p>
capo_config_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_config_service.types.describe_retention_configurations_request.DescribeRetentionConfigurationsRequest]",
) -> OperationResponse[
"capo_config_service.types.describe_retention_configurations_response.DescribeRetentionConfigurationsResponse"
]:
import capo_config_service._operations.starling_dove_service.describe_retention_configurations
output, http_response = (
capo_config_service._operations.starling_dove_service.describe_retention_configurations.describe_retention_configurations(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeRetentionConfigurations")
)
input_: capo_config_service.types.describe_retention_configurations_request.DescribeRetentionConfigurationsRequest = {}
if retention_configuration_names is not None:
input_["retention_configuration_names"] = retention_configuration_names
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|