async def associate_backup_vault_mpa_approval_team(
self,
backup_vault_name: "capo_backup.types.backup_vault_name.BackupVaultName",
mpa_approval_team_arn: "capo_backup.types.arn.ARN",
*,
config_overrides: Optional[AsyncBackupClientConfig] = None,
requester_comment: Optional[
"capo_backup.types.requester_comment.RequesterComment"
] = None,
) -> None:
"""<p>Associates an MPA approval team with a backup vault.</p>
Args:
backup_vault_name: <p>The name of the backup vault to associate with the MPA approval team.</p>
mpa_approval_team_arn: <p>The Amazon Resource Name (ARN) of the MPA approval team to associate with the backup vault.</p>
requester_comment: <p>A comment provided by the requester explaining the association request.</p>
Raises:
capo_backup.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
capo_backup.errors.invalid_request_exception.InvalidRequestException: <p>Indicates that something is wrong with the input to the request. For example, a parameter is of the wrong type.</p>
capo_backup.errors.missing_parameter_value_exception.MissingParameterValueException: <p>Indicates that a required parameter is missing.</p>
capo_backup.errors.resource_not_found_exception.ResourceNotFoundException: <p>A resource that is required for the action doesn't exist.</p>
capo_backup.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request failed due to a temporary failure of the server.</p>
capo_backup.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_backup.types.associate_backup_vault_mpa_approval_team_input.AssociateBackupVaultMpaApprovalTeamInput]",
) -> AsyncOperationResponse[None]:
import capo_backup._operations.cryo_controller_user_manager.associate_backup_vault_mpa_approval_team
(
output,
http_response,
) = await capo_backup._operations.cryo_controller_user_manager.associate_backup_vault_mpa_approval_team.async_associate_backup_vault_mpa_approval_team(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_input(
input_: "capo_backup.types.associate_backup_vault_mpa_approval_team_input.AssociateBackupVaultMpaApprovalTeamInput",
) -> dict[str, Any]:
import capo_backup.types.associate_backup_vault_mpa_approval_team_input
return capo_backup.types.associate_backup_vault_mpa_approval_team_input.redact_sensitive(
input_
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging(
"AssociateBackupVaultMpaApprovalTeam", redact_input=_redact_input
),
)
input_: capo_backup.types.associate_backup_vault_mpa_approval_team_input.AssociateBackupVaultMpaApprovalTeamInput = {
"backup_vault_name": backup_vault_name,
"mpa_approval_team_arn": mpa_approval_team_arn,
}
if requester_comment is not None:
input_["requester_comment"] = requester_comment
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output