Skip to content

update_rotation

update_rotation(
    rotation_id: SsmContactsArn,
    recurrence: RecurrenceSettings,
    *,
    config_overrides: Optional[SSMContactsClientConfig] = None,
    contact_ids: Optional[RotationContactsArnList] = None,
    start_time: Optional[DateTime] = None,
    time_zone_id: Optional[TimeZoneId] = None,
) -> UpdateRotationResult

Updates the information specified for an on-call rotation.

Parameters:

  • rotation_id (SsmContactsArn) –

    The Amazon Resource Name (ARN) of the rotation to update.

  • contact_ids (Optional[RotationContactsArnList], default: None ) –

    The Amazon Resource Names (ARNs) of the contacts to include in the updated rotation.

    Only the PERSONAL contact type is supported. The contact types ESCALATION and ONCALL_SCHEDULE are not supported for this operation.

    The order in which you list the contacts is their shift order in the rotation schedule.

  • start_time (Optional[DateTime], default: None ) –

    The date and time the rotation goes into effect.

  • time_zone_id (Optional[TimeZoneId], default: None ) –

    The time zone to base the updated rotation’s activity on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the Time Zone Database on the IANA website.

    Designators for time zones that don’t support Daylight Savings Time Rules, such as Pacific Standard Time (PST), aren't supported.

  • recurrence (RecurrenceSettings) –

    Information about how long the updated rotation lasts before restarting at the beginning of the shift order.

Raises:

Source code in docs_src/capo_ssm_contacts/_services/ssm_contacts.py
def update_rotation(
    self,
    rotation_id: "capo_ssm_contacts.types.ssm_contacts_arn.SsmContactsArn",
    recurrence: "capo_ssm_contacts.types.recurrence_settings.RecurrenceSettings",
    *,
    config_overrides: Optional[SSMContactsClientConfig] = None,
    contact_ids: Optional[
        "capo_ssm_contacts.types.rotation_contacts_arn_list.RotationContactsArnList"
    ] = None,
    start_time: Optional["capo_ssm_contacts.types.date_time.DateTime"] = None,
    time_zone_id: Optional[
        "capo_ssm_contacts.types.time_zone_id.TimeZoneId"
    ] = None,
) -> "capo_ssm_contacts.types.update_rotation_result.UpdateRotationResult":
    """<p>Updates the information specified for an on-call rotation.</p>

    Args:
        rotation_id: <p>The Amazon Resource Name (ARN) of the rotation to update.</p>
        contact_ids: <p>The Amazon Resource Names (ARNs) of the contacts to include in the updated rotation. </p> <note> <p>Only the <code>PERSONAL</code> contact type is supported. The contact types <code>ESCALATION</code> and <code>ONCALL_SCHEDULE</code> are not supported for this operation. </p> </note> <p>The order in which you list the contacts is their shift order in the rotation schedule.</p>
        start_time: <p>The date and time the rotation goes into effect.</p>
        time_zone_id: <p>The time zone to base the updated rotation’s activity on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the <a href="https://www.iana.org/time-zones">Time Zone Database</a> on the IANA website.</p> <note> <p>Designators for time zones that don’t support Daylight Savings Time Rules, such as Pacific Standard Time (PST), aren't supported.</p> </note>
        recurrence: <p>Information about how long the updated rotation lasts before restarting at the beginning of the shift order.</p>

    Raises:
        capo_ssm_contacts.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this operation.</p>
        capo_ssm_contacts.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource causes an inconsistent state.</p>
        capo_ssm_contacts.errors.internal_server_exception.InternalServerException: <p>Unexpected error occurred while processing the request.</p>
        capo_ssm_contacts.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource that doesn't exist.</p>
        capo_ssm_contacts.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_ssm_contacts.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_ssm_contacts.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm_contacts.types.update_rotation_request.UpdateRotationRequest]",
    ) -> OperationResponse[
        "capo_ssm_contacts.types.update_rotation_result.UpdateRotationResult"
    ]:
        import capo_ssm_contacts._operations.ssm_contacts.update_rotation

        output, http_response = (
            capo_ssm_contacts._operations.ssm_contacts.update_rotation.update_rotation(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateRotation")
    )
    input_: capo_ssm_contacts.types.update_rotation_request.UpdateRotationRequest = {
        "rotation_id": rotation_id,
        "recurrence": recurrence,
    }
    if contact_ids is not None:
        input_["contact_ids"] = contact_ids
    if start_time is not None:
        input_["start_time"] = start_time
    if time_zone_id is not None:
        input_["time_zone_id"] = time_zone_id

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output