monitoring_schedules
Creates, updates, deletes or gets a monitoring_schedule resource or lists monitoring_schedules in a region
Overview
| Name | monitoring_schedules |
| Type | Resource |
| Description | Resource Type definition for AWS::SageMaker::MonitoringSchedule |
| Id | awscc.sagemaker.monitoring_schedules |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
monitoring_schedule_arn | string | The Amazon Resource Name (ARN) of the monitoring schedule. |
monitoring_schedule_name | string | The name of the monitoring schedule. |
monitoring_schedule_config | object | The configuration object that specifies the monitoring schedule and defines the monitoring job. |
tags | array | An array of key-value pairs to apply to this resource. |
creation_time | string | The time at which the schedule was created. |
endpoint_name | string | The name of the endpoint used to run the monitoring job. |
failure_reason | string | Contains the reason a monitoring job failed, if it failed. |
last_modified_time | string | A timestamp that indicates the last time the monitoring job was modified. |
last_monitoring_execution_summary | object | Describes metadata on the last execution to run, if there was one. |
monitoring_schedule_status | string | The status of a schedule job. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
monitoring_schedule_arn | string | The Amazon Resource Name (ARN) of the monitoring schedule. |
region | string | AWS region. |
For more information, see AWS::SageMaker::MonitoringSchedule.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | monitoring_schedules | INSERT | MonitoringScheduleConfig, MonitoringScheduleName, region |
delete_resource | monitoring_schedules | DELETE | Identifier, region |
update_resource | monitoring_schedules | UPDATE | Identifier, PatchDocument, region |
list_resources | monitoring_schedules_list_only | SELECT | region |
get_resource | monitoring_schedules | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual monitoring_schedule.
SELECT
region,
monitoring_schedule_arn,
monitoring_schedule_name,
monitoring_schedule_config,
tags,
creation_time,
endpoint_name,
failure_reason,
last_modified_time,
last_monitoring_execution_summary,
monitoring_schedule_status
FROM awscc.sagemaker.monitoring_schedules
WHERE
region = '{{ region }}' AND
Identifier = '{{ monitoring_schedule_arn }}';
Lists all monitoring_schedules in a region.
SELECT
region,
monitoring_schedule_arn
FROM awscc.sagemaker.monitoring_schedules_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new monitoring_schedule resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.sagemaker.monitoring_schedules (
MonitoringScheduleName,
MonitoringScheduleConfig,
region
)
SELECT
'{{ monitoring_schedule_name }}',
'{{ monitoring_schedule_config }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.sagemaker.monitoring_schedules (
MonitoringScheduleName,
MonitoringScheduleConfig,
Tags,
EndpointName,
FailureReason,
LastMonitoringExecutionSummary,
MonitoringScheduleStatus,
region
)
SELECT
'{{ monitoring_schedule_name }}',
'{{ monitoring_schedule_config }}',
'{{ tags }}',
'{{ endpoint_name }}',
'{{ failure_reason }}',
'{{ last_monitoring_execution_summary }}',
'{{ monitoring_schedule_status }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: monitoring_schedule
props:
- name: monitoring_schedule_name
value: '{{ monitoring_schedule_name }}'
- name: monitoring_schedule_config
value:
monitoring_job_definition:
baseline_config:
constraints_resource:
s3_uri: '{{ s3_uri }}'
statistics_resource:
s3_uri: null
environment: {}
monitoring_app_specification:
container_arguments:
- '{{ container_arguments[0] }}'
container_entrypoint:
- '{{ container_entrypoint[0] }}'
image_uri: '{{ image_uri }}'
post_analytics_processor_source_uri: null
record_preprocessor_source_uri: null
monitoring_inputs:
- endpoint_input:
endpoint_name: '{{ endpoint_name }}'
local_path: '{{ local_path }}'
s3_data_distribution_type: '{{ s3_data_distribution_type }}'
s3_input_mode: '{{ s3_input_mode }}'
exclude_features_attribute: '{{ exclude_features_attribute }}'
batch_transform_input:
data_captured_destination_s3_uri: '{{ data_captured_destination_s3_uri }}'
dataset_format:
csv:
header: '{{ header }}'
json:
line: '{{ line }}'
parquet: '{{ parquet }}'
local_path: '{{ local_path }}'
s3_data_distribution_type: '{{ s3_data_distribution_type }}'
s3_input_mode: '{{ s3_input_mode }}'
exclude_features_attribute: '{{ exclude_features_attribute }}'
monitoring_output_config:
kms_key_id: '{{ kms_key_id }}'
monitoring_outputs:
- s3_output:
local_path: '{{ local_path }}'
s3_upload_mode: '{{ s3_upload_mode }}'
s3_uri: '{{ s3_uri }}'
monitoring_resources:
cluster_config:
instance_count: '{{ instance_count }}'
instance_type: '{{ instance_type }}'
volume_size_in_gb: '{{ volume_size_in_gb }}'
volume_kms_key_id: '{{ volume_kms_key_id }}'
network_config:
enable_inter_container_traffic_encryption: '{{ enable_inter_container_traffic_encryption }}'
enable_network_isolation: '{{ enable_network_isolation }}'
vpc_config:
security_group_ids:
- '{{ security_group_ids[0] }}'
subnets:
- '{{ subnets[0] }}'
role_arn: '{{ role_arn }}'
stopping_condition:
max_runtime_in_seconds: '{{ max_runtime_in_seconds }}'
monitoring_job_definition_name: '{{ monitoring_job_definition_name }}'
monitoring_type: '{{ monitoring_type }}'
schedule_config:
schedule_expression: '{{ schedule_expression }}'
data_analysis_start_time: '{{ data_analysis_start_time }}'
data_analysis_end_time: null
- name: tags
value:
- value: '{{ value }}'
key: '{{ key }}'
- name: endpoint_name
value: null
- name: failure_reason
value: '{{ failure_reason }}'
- name: last_monitoring_execution_summary
value:
creation_time: '{{ creation_time }}'
endpoint_name: null
failure_reason: '{{ failure_reason }}'
last_modified_time: '{{ last_modified_time }}'
monitoring_execution_status: '{{ monitoring_execution_status }}'
monitoring_schedule_name: null
processing_job_arn: '{{ processing_job_arn }}'
scheduled_time: '{{ scheduled_time }}'
- name: monitoring_schedule_status
value: '{{ monitoring_schedule_status }}'
UPDATE example
Use the following StackQL query and manifest file to update a monitoring_schedule resource, using stack-deploy.
/*+ update */
UPDATE awscc.sagemaker.monitoring_schedules
SET PatchDocument = string('{{ {
"MonitoringScheduleConfig": monitoring_schedule_config,
"Tags": tags,
"EndpointName": endpoint_name,
"FailureReason": failure_reason,
"LastMonitoringExecutionSummary": last_monitoring_execution_summary,
"MonitoringScheduleStatus": monitoring_schedule_status
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ monitoring_schedule_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.sagemaker.monitoring_schedules
WHERE
Identifier = '{{ monitoring_schedule_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the monitoring_schedules resource, the following permissions are required:
- Create
- Delete
- List
- Read
- Update
sagemaker:CreateMonitoringSchedule,
sagemaker:DescribeMonitoringSchedule,
iam:PassRole
sagemaker:DeleteMonitoringSchedule,
sagemaker:DescribeMonitoringSchedule
sagemaker:ListMonitoringSchedule
sagemaker:DescribeMonitoringSchedule
sagemaker:UpdateMonitoringSchedule,
sagemaker:DescribeMonitoringSchedule