Skip to content

list_resource_data_sync

list_resource_data_sync(
    *,
    config_overrides: Optional[SSMClientConfig] = None,
    sync_type: Optional[ResourceDataSyncType] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListResourceDataSyncResult

Lists your resource data sync configurations. Includes information about the last time a sync attempted to start, the last sync status, and the last time a sync successfully completed.

The number of sync configurations might be too large to return using a single call to ListResourceDataSync. You can limit the number of sync configurations returned by using the MaxResults parameter. To determine whether there are more sync configurations to list, check the value of NextToken in the output. If there are more sync configurations to list, you can request them by specifying the NextToken returned in the call to the parameter of a subsequent call.

Parameters:

  • sync_type (Optional[ResourceDataSyncType], default: None ) –

    View a list of resource data syncs according to the sync type. Specify SyncToDestination to view resource data syncs that synchronize data to an Amazon S3 bucket. Specify SyncFromSource to view resource data syncs from Organizations or from multiple Amazon Web Services Regions.

  • next_token (Optional[NextToken], default: None ) –

    A token to start the list. Use this token to get the next set of results.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

Raises:

Source code in docs_src/capo_ssm/_services/ssm.py
def list_resource_data_sync(
    self,
    *,
    config_overrides: Optional[SSMClientConfig] = None,
    sync_type: Optional[
        "capo_ssm.types.resource_data_sync_type.ResourceDataSyncType"
    ] = None,
    next_token: Optional["capo_ssm.types.next_token.NextToken"] = None,
    max_results: Optional["capo_ssm.types.max_results.MaxResults"] = None,
) -> "capo_ssm.types.list_resource_data_sync_result.ListResourceDataSyncResult":
    """<p>Lists your resource data sync configurations. Includes information about the last time a sync attempted to start, the last sync status, and the last time a sync successfully completed.</p> <p>The number of sync configurations might be too large to return using a single call to <code>ListResourceDataSync</code>. You can limit the number of sync configurations returned by using the <code>MaxResults</code> parameter. To determine whether there are more sync configurations to list, check the value of <code>NextToken</code> in the output. If there are more sync configurations to list, you can request them by specifying the <code>NextToken</code> returned in the call to the parameter of a subsequent call. </p>

    Args:
        sync_type: <p>View a list of resource data syncs according to the sync type. Specify <code>SyncToDestination</code> to view resource data syncs that synchronize data to an Amazon S3 bucket. Specify <code>SyncFromSource</code> to view resource data syncs from Organizations or from multiple Amazon Web Services Regions.</p>
        next_token: <p>A token to start the list. Use this token to get the next set of results. </p>
        max_results: <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>

    Raises:
        capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_ssm.errors.invalid_next_token.InvalidNextToken: <p>The specified token isn't valid.</p>
        capo_ssm.errors.resource_data_sync_invalid_configuration_exception.ResourceDataSyncInvalidConfigurationException: <p>The specified sync configuration is invalid.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm.types.list_resource_data_sync_request.ListResourceDataSyncRequest]",
    ) -> OperationResponse[
        "capo_ssm.types.list_resource_data_sync_result.ListResourceDataSyncResult"
    ]:
        import capo_ssm._operations.amazon_ssm.list_resource_data_sync

        output, http_response = (
            capo_ssm._operations.amazon_ssm.list_resource_data_sync.list_resource_data_sync(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListResourceDataSync")
    )
    input_: capo_ssm.types.list_resource_data_sync_request.ListResourceDataSyncRequest = {}
    if sync_type is not None:
        input_["sync_type"] = sync_type
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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