set_status(
pipeline_id: id,
object_ids: idList,
status: string,
*,
config_overrides: Optional[DataPipelineClientConfig] = None,
) -> None
Requests that the status of the specified physical or logical pipeline objects be updated in the specified pipeline. This update might not occur immediately, but is eventually consistent. The status that can be set depends on the type of object (for example, DataNode or Activity). You cannot perform this operation on FINISHED pipelines and attempting to do so returns InvalidRequestException.
POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.SetStatus Content-Length: 100 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineId": "df-0634701J7KEXAMPLE", "objectIds": ["o-08600941GHJWMBR9E2"], "status": "pause"} x-amzn-RequestId: e83b8ab7-076a-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 0 Date: Mon, 12 Nov 2012 17:50:53 GMT Unexpected response: 200, OK, undefined
Parameters:
-
pipeline_id
(id)
–
The ID of the pipeline that contains the objects.
-
object_ids
(idList)
–
The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.
-
status
(string)
–
The status to be set on all the objects specified in objectIds. For components, use PAUSE or RESUME. For instances, use TRY_CANCEL, RERUN, or MARK_FINISHED.
Raises:
-
InternalServiceError
–
An internal service error occurred.
-
InvalidRequestException
–
The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.
-
PipelineDeletedException
–
The specified pipeline has been deleted.
-
PipelineNotFoundException
–
The specified pipeline was not found. Verify that you used the correct user and account identifiers.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_data_pipeline/_services/data_pipeline.py
| def set_status(
self,
pipeline_id: "capo_data_pipeline.types.id.id",
object_ids: "capo_data_pipeline.types.id_list.idList",
status: "capo_data_pipeline.types.string.string",
*,
config_overrides: Optional[DataPipelineClientConfig] = None,
) -> None:
"""<p>Requests that the status of the specified physical or logical pipeline objects be updated in the specified pipeline. This update might not occur immediately, but is eventually consistent. The status that can be set depends on the type of object (for example, DataNode or Activity). You cannot perform this operation on <code>FINISHED</code> pipelines and attempting to do so returns <code>InvalidRequestException</code>.</p> <examples> <request> POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.SetStatus Content-Length: 100 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineId": "df-0634701J7KEXAMPLE", "objectIds": ["o-08600941GHJWMBR9E2"], "status": "pause"} </request> <response> x-amzn-RequestId: e83b8ab7-076a-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 0 Date: Mon, 12 Nov 2012 17:50:53 GMT Unexpected response: 200, OK, undefined </response> </examples>
Args:
pipeline_id: <p>The ID of the pipeline that contains the objects.</p>
object_ids: <p>The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.</p>
status: <p>The status to be set on all the objects specified in <code>objectIds</code>. For components, use <code>PAUSE</code> or <code>RESUME</code>. For instances, use <code>TRY_CANCEL</code>, <code>RERUN</code>, or <code>MARK_FINISHED</code>.</p>
Raises:
capo_data_pipeline.errors.internal_service_error.InternalServiceError: <p>An internal service error occurred.</p>
capo_data_pipeline.errors.invalid_request_exception.InvalidRequestException: <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
capo_data_pipeline.errors.pipeline_deleted_exception.PipelineDeletedException: <p>The specified pipeline has been deleted.</p>
capo_data_pipeline.errors.pipeline_not_found_exception.PipelineNotFoundException: <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
capo_data_pipeline.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_data_pipeline.types.set_status_input.SetStatusInput]",
) -> OperationResponse[None]:
import capo_data_pipeline._operations.data_pipeline.set_status
output, http_response = (
capo_data_pipeline._operations.data_pipeline.set_status.set_status(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("SetStatus")
)
input_: capo_data_pipeline.types.set_status_input.SetStatusInput = {
"pipeline_id": pipeline_id,
"object_ids": object_ids,
"status": status,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|