Skip to content

create_monitor

create_monitor(
    display_name: ResourceName,
    identity_center_instance_arn: IdentityCenterInstanceArn,
    subdomain: Subdomain,
    role_arn: IamRoleArn,
    *,
    config_overrides: Optional[deadlineClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    identity_center_region: Optional[Region] = None,
    tags: Optional[Tags] = None,
) -> CreateMonitorResponse

Creates an Amazon Web Services Deadline Cloud monitor that you can use to view your farms, queues, and fleets. After you submit a job, you can track the progress of the tasks and steps that make up the job, and then download the job's results.

Parameters:

  • client_token (Optional[ClientToken], default: None ) –

    The unique token which the server uses to recognize retries of the same request.

  • display_name (ResourceName) –

    The name that you give the monitor that is displayed in the Deadline Cloud console.

    This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.

  • identity_center_instance_arn (IdentityCenterInstanceArn) –

    The Amazon Resource Name of the IAM Identity Center instance that authenticates monitor users.

  • identity_center_region (Optional[Region], default: None ) –

    The Region where IAM Identity Center is enabled. Required when IAM Identity Center is in a different Region than the monitor.

  • subdomain (Subdomain) –

    The subdomain to use when creating the monitor URL. The full URL of the monitor is subdomain.Region.deadlinecloud.amazonaws.com.

  • role_arn (IamRoleArn) –

    The Amazon Resource Name of the IAM role that the monitor uses to connect to Deadline Cloud. Every user that signs in to the monitor using IAM Identity Center uses this role to access Deadline Cloud resources.

  • tags (Optional[Tags], default: None ) –

    The tags to add to your monitor. Each tag consists of a tag key and a tag value. Tag keys and values are both required, but tag values can be empty strings.

Raises:

Source code in docs_src/capo_deadline/_services/deadline.py
def create_monitor(
    self,
    display_name: "capo_deadline.types.resource_name.ResourceName",
    identity_center_instance_arn: "capo_deadline.types.identity_center_instance_arn.IdentityCenterInstanceArn",
    subdomain: "capo_deadline.types.subdomain.Subdomain",
    role_arn: "capo_deadline.types.iam_role_arn.IamRoleArn",
    *,
    config_overrides: Optional[deadlineClientConfig] = None,
    client_token: Optional["capo_deadline.types.client_token.ClientToken"] = None,
    identity_center_region: Optional["capo_deadline.types.region.Region"] = None,
    tags: Optional["capo_deadline.types.tags.Tags"] = None,
) -> "capo_deadline.types.create_monitor_response.CreateMonitorResponse":
    """<p>Creates an Amazon Web Services Deadline Cloud monitor that you can use to view your farms, queues, and fleets. After you submit a job, you can track the progress of the tasks and steps that make up the job, and then download the job's results. </p>

    Args:
        client_token: <p>The unique token which the server uses to recognize retries of the same request.</p>
        display_name: <p>The name that you give the monitor that is displayed in the Deadline Cloud console.</p> <important> <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p> </important>
        identity_center_instance_arn: <p>The Amazon Resource Name of the IAM Identity Center instance that authenticates monitor users.</p>
        identity_center_region: <p>The Region where IAM Identity Center is enabled. Required when IAM Identity Center is in a different Region than the monitor.</p>
        subdomain: <p>The subdomain to use when creating the monitor URL. The full URL of the monitor is subdomain.Region.deadlinecloud.amazonaws.com.</p>
        role_arn: <p>The Amazon Resource Name of the IAM role that the monitor uses to connect to Deadline Cloud. Every user that signs in to the monitor using IAM Identity Center uses this role to access Deadline Cloud resources.</p>
        tags: <p>The tags to add to your monitor. Each tag consists of a tag key and a tag value. Tag keys and values are both required, but tag values can be empty strings.</p>

    Raises:
        capo_deadline.errors.access_denied_exception.AccessDeniedException: <p>You don't have permission to perform the action.</p>
        capo_deadline.errors.internal_server_error_exception.InternalServerErrorException: <p>Deadline Cloud can't process your request right now. Try again later.</p>
        capo_deadline.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>You exceeded your service quota. Service quotas, also referred to as limits, are the maximum number of service resources or operations for your Amazon Web Services account.</p>
        capo_deadline.errors.throttling_exception.ThrottlingException: <p>Your request exceeded a request rate quota.</p>
        capo_deadline.errors.validation_exception.ValidationException: <p>The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.</p>
        capo_deadline.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_deadline.types.create_monitor_request.CreateMonitorRequest]",
    ) -> OperationResponse[
        "capo_deadline.types.create_monitor_response.CreateMonitorResponse"
    ]:
        import capo_deadline._operations.deadline.create_monitor

        output, http_response = (
            capo_deadline._operations.deadline.create_monitor.create_monitor(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateMonitor")
    )
    input_: capo_deadline.types.create_monitor_request.CreateMonitorRequest = {
        "display_name": display_name,
        "identity_center_instance_arn": identity_center_instance_arn,
        "subdomain": subdomain,
        "role_arn": role_arn,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if identity_center_region is not None:
        input_["identity_center_region"] = identity_center_region
    if tags is not None:
        input_["tags"] = tags

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