Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 48 additions & 1 deletion sample/sagemaker/2017-07-24/service-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@
{"shape":"ResourceLimitExceeded"},
{"shape":"ResourceNotFound"}
],
"documentation":"<p>Starts a transform job. A transform job uses a trained model to get inferences on a dataset and saves these results to an Amazon S3 location that you specify.</p> <p>To perform batch transformations, you create a transform job and use the data that you have readily available.</p> <p>In the request body, you provide the following:</p> <ul> <li> <p> <code>TransformJobName</code> - Identifies the transform job. The name must be unique within an Amazon Web Services Region in an Amazon Web Services account.</p> </li> <li> <p> <code>ModelName</code> - Identifies the model to use. <code>ModelName</code> must be the name of an existing Amazon SageMaker model in the same Amazon Web Services Region and Amazon Web Services account. For information on creating a model, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModel.html\">CreateModel</a>.</p> </li> <li> <p> <code>TransformInput</code> - Describes the dataset to be transformed and the Amazon S3 location where it is stored.</p> </li> <li> <p> <code>TransformOutput</code> - Identifies the Amazon S3 location where you want Amazon SageMaker to save the results from the transform job.</p> </li> <li> <p> <code>TransformResources</code> - Identifies the ML compute instances for the transform job.</p> </li> </ul> <p>For more information about how batch transformation works, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/batch-transform.html\">Batch Transform</a>.</p>"
"documentation":"<p>Starts a transform job. A transform job uses a trained model to get inferences on a dataset and saves these results to an Amazon S3 location that you specify.</p> <p>To perform batch transformations, you create a transform job and use the data that you have readily available.</p> <p>In the request body, you provide the following:</p> <ul> <li> <p> <code>TransformJobName</code> - Identifies the transform job. The name must be unique within an Amazon Web Services Region in an Amazon Web Services account.</p> </li> <li> <p> <code>ModelName</code> - Identifies the model to use. <code>ModelName</code> must be the name of an existing Amazon SageMaker model in the same Amazon Web Services Region and Amazon Web Services account. For information on creating a model, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModel.html\">CreateModel</a>.</p> </li> <li> <p> <code>TransformInput</code> - Describes the dataset to be transformed and the Amazon S3 location where it is stored.</p> </li> <li> <p> <code>TransformOutput</code> - Identifies the Amazon S3 location where you want Amazon SageMaker to save the results from the transform job.</p> </li> <li> <p> <code>TransformResources</code> - Identifies the ML compute instances and AMI image versions for the transform job.</p> </li> </ul> <p>For more information about how batch transformation works, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/batch-transform.html\">Batch Transform</a>.</p>"
},
"CreateTrial":{
"name":"CreateTrial",
Expand Down Expand Up @@ -9161,6 +9161,10 @@
"ResourceSpec":{
"shape":"ResourceSpec",
"documentation":"<p>The instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance.</p> <note> <p>The value of <code>InstanceType</code> passed as part of the <code>ResourceSpec</code> in the <code>CreateApp</code> call overrides the value passed as part of the <code>ResourceSpec</code> configured for the user profile or the domain. If <code>InstanceType</code> is not specified in any of those three <code>ResourceSpec</code> values for a <code>KernelGateway</code> app, the <code>CreateApp</code> call fails with a request validation error.</p> </note>"
},
"RecoveryMode":{
"shape":"Boolean",
"documentation":"<p> Indicates whether the application is launched in recovery mode. </p>"
}
}
},
Expand Down Expand Up @@ -11193,6 +11197,10 @@
"OnStart":{
"shape":"NotebookInstanceLifecycleConfigList",
"documentation":"<p>A shell script that runs every time you start a notebook instance, including when you create the notebook instance. The shell script must be a base64-encoded string.</p>"
},
"Tags":{
"shape":"TagList",
"documentation":"<p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href=\"https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html\">Tagging Amazon Web Services Resources</a>.</p>"
}
}
},
Expand Down Expand Up @@ -13888,6 +13896,10 @@
"shape":"AppStatus",
"documentation":"<p>The status.</p>"
},
"RecoveryMode":{
"shape":"Boolean",
"documentation":"<p> Indicates whether the application is launched in recovery mode. </p>"
},
"LastHealthCheckTimestamp":{
"shape":"Timestamp",
"documentation":"<p>The timestamp of the last health check.</p>"
Expand Down Expand Up @@ -35366,6 +35378,13 @@
},
"documentation":"<p>Metadata for a register model job step.</p>"
},
"Relation":{
"type":"string",
"enum":[
"EqualTo",
"GreaterThanOrEqualTo"
]
},
"ReleaseNotes":{
"type":"string",
"max":255,
Expand Down Expand Up @@ -36455,6 +36474,10 @@
"NextToken":{
"shape":"NextToken",
"documentation":"<p>If the result of the previous <code>Search</code> request was truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next request.</p>"
},
"TotalHits":{
"shape":"TotalHits",
"documentation":"<p>The total number of matching results.</p>"
}
}
},
Expand Down Expand Up @@ -38451,6 +38474,20 @@
"max":256,
"min":1
},
"TotalHits":{
"type":"structure",
"members":{
"Value":{
"shape":"Long",
"documentation":"<p>The total number of matching results. This value may be exact or an estimate, depending on the <code>Relation</code> field.</p>"
},
"Relation":{
"shape":"Relation",
"documentation":"<p>Indicates the relationship between the returned <code>Value</code> and the actual total number of matching results. Possible values are:</p> <ul> <li> <p> <code>EqualTo</code>: The <code>Value</code> is the exact count of matching results.</p> </li> <li> <p> <code>GreaterThanOrEqualTo</code>: The <code>Value</code> is a lower bound of the actual count of matching results.</p> </li> </ul>"
}
},
"documentation":"<p>Represents the total number of matching results and indicates how accurate that count is.</p> <p>The <code>Value</code> field provides the count, which may be exact or estimated. The <code>Relation</code> field indicates whether it's an exact figure or a lower bound. This helps understand the full scope of search results, especially when dealing with large result sets.</p>"
},
"TotalInstanceCount":{
"type":"integer",
"min":0
Expand Down Expand Up @@ -39388,6 +39425,12 @@
"type":"integer",
"min":1
},
"TransformAmiVersion":{
"type":"string",
"max":63,
"min":1,
"pattern":"^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$"
},
"TransformDataSource":{
"type":"structure",
"required":["S3DataSource"],
Expand Down Expand Up @@ -39780,6 +39823,10 @@
"VolumeKmsKeyId":{
"shape":"KmsKeyId",
"documentation":"<p>The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt model data on the storage volume attached to the ML compute instance(s) that run the batch transform job.</p> <note> <p>Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a <code>VolumeKmsKeyId</code> when using an instance type with local storage.</p> <p>For a list of instance types that support local instance storage, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html#instance-store-volumes\">Instance Store Volumes</a>.</p> <p>For more information about local instance storage encryption, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ssd-instance-store.html\">SSD Instance Store Volumes</a>.</p> </note> <p> The <code>VolumeKmsKeyId</code> can be any of the following formats:</p> <ul> <li> <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li> <li> <p>Key ARN: <code>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li> <li> <p>Alias name: <code>alias/ExampleAlias</code> </p> </li> <li> <p>Alias name ARN: <code>arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias</code> </p> </li> </ul>"
},
"TransformAmiVersion":{
"shape":"TransformAmiVersion",
"documentation":"<p>Specifies an option from a collection of preconfigured Amazon Machine Image (AMI) images. Each image is configured by Amazon Web Services with a set of software and driver versions.</p> <dl> <dt>al2-ami-sagemaker-batch-gpu-470</dt> <dd> <ul> <li> <p>Accelerator: GPU</p> </li> <li> <p>NVIDIA driver version: 470</p> </li> </ul> </dd> <dt>al2-ami-sagemaker-batch-gpu-535</dt> <dd> <ul> <li> <p>Accelerator: GPU</p> </li> <li> <p>NVIDIA driver version: 535</p> </li> </ul> </dd> </dl>"
}
},
"documentation":"<p>Describes the resources, including ML instance types and ML instance count, to use for transform job.</p>"
Expand Down
12 changes: 12 additions & 0 deletions src/sagemaker_core/main/code_injection/shape_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -1817,6 +1817,7 @@
{"name": "AppName", "shape": "AppName", "type": "string"},
{"name": "Tags", "shape": "TagList", "type": "list"},
{"name": "ResourceSpec", "shape": "ResourceSpec", "type": "structure"},
{"name": "RecoveryMode", "shape": "Boolean", "type": "boolean"},
],
"type": "structure",
},
Expand Down Expand Up @@ -2743,6 +2744,7 @@
},
{"name": "OnCreate", "shape": "NotebookInstanceLifecycleConfigList", "type": "list"},
{"name": "OnStart", "shape": "NotebookInstanceLifecycleConfigList", "type": "list"},
{"name": "Tags", "shape": "TagList", "type": "list"},
],
"type": "structure",
},
Expand Down Expand Up @@ -4053,6 +4055,7 @@
{"name": "UserProfileName", "shape": "UserProfileName", "type": "string"},
{"name": "SpaceName", "shape": "SpaceName", "type": "string"},
{"name": "Status", "shape": "AppStatus", "type": "string"},
{"name": "RecoveryMode", "shape": "Boolean", "type": "boolean"},
{"name": "LastHealthCheckTimestamp", "shape": "Timestamp", "type": "timestamp"},
{"name": "LastUserActivityTimestamp", "shape": "Timestamp", "type": "timestamp"},
{"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"},
Expand Down Expand Up @@ -13337,6 +13340,7 @@
"members": [
{"name": "Results", "shape": "SearchResultsList", "type": "list"},
{"name": "NextToken", "shape": "NextToken", "type": "string"},
{"name": "TotalHits", "shape": "TotalHits", "type": "structure"},
],
"type": "structure",
},
Expand Down Expand Up @@ -14088,6 +14092,13 @@
],
"type": "structure",
},
"TotalHits": {
"members": [
{"name": "Value", "shape": "Long", "type": "long"},
{"name": "Relation", "shape": "Relation", "type": "string"},
],
"type": "structure",
},
"TrackingServerSummary": {
"members": [
{"name": "TrackingServerArn", "shape": "TrackingServerArn", "type": "string"},
Expand Down Expand Up @@ -14488,6 +14499,7 @@
{"name": "InstanceType", "shape": "TransformInstanceType", "type": "string"},
{"name": "InstanceCount", "shape": "TransformInstanceCount", "type": "integer"},
{"name": "VolumeKmsKeyId", "shape": "KmsKeyId", "type": "string"},
{"name": "TransformAmiVersion", "shape": "TransformAmiVersion", "type": "string"},
],
"type": "structure",
},
Expand Down
13 changes: 12 additions & 1 deletion src/sagemaker_core/main/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,7 @@ class App(Base):
user_profile_name: The user profile name.
space_name: The name of the space. If this value is not set, then UserProfileName must be set.
status: The status.
recovery_mode: Indicates whether the application is launched in recovery mode.
last_health_check_timestamp: The timestamp of the last health check.
last_user_activity_timestamp: The timestamp of the last user's activity. LastUserActivityTimestamp is also updated when SageMaker AI performs health checks without user activity. As a result, this value is set to the same value as LastHealthCheckTimestamp.
creation_time: The creation time of the application. After an application has been shut down for 24 hours, SageMaker AI deletes all metadata for the application. To be considered an update and retain application metadata, applications must be restarted within 24 hours after the previous application has been shut down. After this time window, creation of an application is considered a new application rather than an update of the previous application.
Expand All @@ -990,6 +991,7 @@ class App(Base):
user_profile_name: Optional[str] = Unassigned()
space_name: Optional[str] = Unassigned()
status: Optional[str] = Unassigned()
recovery_mode: Optional[bool] = Unassigned()
last_health_check_timestamp: Optional[datetime.datetime] = Unassigned()
last_user_activity_timestamp: Optional[datetime.datetime] = Unassigned()
creation_time: Optional[datetime.datetime] = Unassigned()
Expand Down Expand Up @@ -1024,6 +1026,7 @@ def create(
space_name: Optional[Union[str, object]] = Unassigned(),
tags: Optional[List[Tag]] = Unassigned(),
resource_spec: Optional[ResourceSpec] = Unassigned(),
recovery_mode: Optional[bool] = Unassigned(),
session: Optional[Session] = None,
region: Optional[str] = None,
) -> Optional["App"]:
Expand All @@ -1038,6 +1041,7 @@ def create(
space_name: The name of the space. If this value is not set, then UserProfileName must be set.
tags: Each tag consists of a key and an optional value. Tag keys must be unique per resource.
resource_spec: The instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance. The value of InstanceType passed as part of the ResourceSpec in the CreateApp call overrides the value passed as part of the ResourceSpec configured for the user profile or the domain. If InstanceType is not specified in any of those three ResourceSpec values for a KernelGateway app, the CreateApp call fails with a request validation error.
recovery_mode: Indicates whether the application is launched in recovery mode.
session: Boto3 session.
region: Region name.

Expand Down Expand Up @@ -1074,6 +1078,7 @@ def create(
"AppName": app_name,
"Tags": tags,
"ResourceSpec": resource_spec,
"RecoveryMode": recovery_mode,
}

operation_input_args = Base.populate_chained_attributes(
Expand Down Expand Up @@ -22868,6 +22873,7 @@ def create(
notebook_instance_lifecycle_config_name: str,
on_create: Optional[List[NotebookInstanceLifecycleHook]] = Unassigned(),
on_start: Optional[List[NotebookInstanceLifecycleHook]] = Unassigned(),
tags: Optional[List[Tag]] = Unassigned(),
session: Optional[Session] = None,
region: Optional[str] = None,
) -> Optional["NotebookInstanceLifecycleConfig"]:
Expand All @@ -22878,6 +22884,7 @@ def create(
notebook_instance_lifecycle_config_name: The name of the lifecycle configuration.
on_create: A shell script that runs only once, when you create a notebook instance. The shell script must be a base64-encoded string.
on_start: A shell script that runs every time you start a notebook instance, including when you create the notebook instance. The shell script must be a base64-encoded string.
tags: An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.
session: Boto3 session.
region: Region name.

Expand Down Expand Up @@ -22909,6 +22916,7 @@ def create(
"NotebookInstanceLifecycleConfigName": notebook_instance_lifecycle_config_name,
"OnCreate": on_create,
"OnStart": on_start,
"Tags": tags,
}

operation_input_args = Base.populate_chained_attributes(
Expand Down Expand Up @@ -23690,7 +23698,10 @@ def get_name(self) -> str:
def populate_inputs_decorator(create_func):
@functools.wraps(create_func)
def wrapper(*args, **kwargs):
config_schema_for_resource = {"execution_role_arn": {"type": "string"}}
config_schema_for_resource = {
"execution_role_arn": {"type": "string"},
"kms_key_id": {"type": "string"},
}
return create_func(
*args,
**Base.get_updated_kwargs_with_configured_attributes(
Expand Down
Loading