UpdateModelPackage
Updates a versioned model.
Request Syntax
{
"AdditionalInferenceSpecificationsToAdd": [
{
"Containers": [
{
"AdditionalS3DataSource": {
"CompressionType": "string
",
"S3DataType": "string
",
"S3Uri": "string
"
},
"ContainerHostname": "string
",
"Environment": {
"string
" : "string
"
},
"Framework": "string
",
"FrameworkVersion": "string
",
"Image": "string
",
"ImageDigest": "string
",
"ModelDataSource": {
"S3DataSource": {
"CompressionType": "string
",
"HubAccessConfig": {
"HubContentArn": "string
"
},
"ManifestS3Uri": "string
",
"ModelAccessConfig": {
"AcceptEula": boolean
},
"S3DataType": "string
",
"S3Uri": "string
"
}
},
"ModelDataUrl": "string
",
"ModelInput": {
"DataInputConfig": "string
"
},
"NearestModelName": "string
",
"ProductId": "string
"
}
],
"Description": "string
",
"Name": "string
",
"SupportedContentTypes": [ "string
" ],
"SupportedRealtimeInferenceInstanceTypes": [ "string
" ],
"SupportedResponseMIMETypes": [ "string
" ],
"SupportedTransformInstanceTypes": [ "string
" ]
}
],
"ApprovalDescription": "string
",
"ClientToken": "string
",
"CustomerMetadataProperties": {
"string
" : "string
"
},
"CustomerMetadataPropertiesToRemove": [ "string
" ],
"InferenceSpecification": {
"Containers": [
{
"AdditionalS3DataSource": {
"CompressionType": "string
",
"S3DataType": "string
",
"S3Uri": "string
"
},
"ContainerHostname": "string
",
"Environment": {
"string
" : "string
"
},
"Framework": "string
",
"FrameworkVersion": "string
",
"Image": "string
",
"ImageDigest": "string
",
"ModelDataSource": {
"S3DataSource": {
"CompressionType": "string
",
"HubAccessConfig": {
"HubContentArn": "string
"
},
"ManifestS3Uri": "string
",
"ModelAccessConfig": {
"AcceptEula": boolean
},
"S3DataType": "string
",
"S3Uri": "string
"
}
},
"ModelDataUrl": "string
",
"ModelInput": {
"DataInputConfig": "string
"
},
"NearestModelName": "string
",
"ProductId": "string
"
}
],
"SupportedContentTypes": [ "string
" ],
"SupportedRealtimeInferenceInstanceTypes": [ "string
" ],
"SupportedResponseMIMETypes": [ "string
" ],
"SupportedTransformInstanceTypes": [ "string
" ]
},
"ModelApprovalStatus": "string
",
"ModelCard": {
"ModelCardContent": "string
",
"ModelCardStatus": "string
"
},
"ModelLifeCycle": {
"Stage": "string
",
"StageDescription": "string
",
"StageStatus": "string
"
},
"ModelPackageArn": "string
",
"SourceUri": "string
"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- AdditionalInferenceSpecificationsToAdd
-
An array of additional Inference Specification objects to be added to the existing array additional Inference Specification. Total number of additional Inference Specifications can not exceed 15. Each additional Inference Specification specifies artifacts based on this model package that can be used on inference endpoints. Generally used with SageMaker Neo to store the compiled artifacts.
Type: Array of AdditionalInferenceSpecificationDefinition objects
Array Members: Minimum number of 1 item. Maximum number of 15 items.
Required: No
- ApprovalDescription
-
A description for the approval status of the model.
Type: String
Length Constraints: Maximum length of 1024.
Pattern:
.*
Required: No
- ClientToken
-
A unique token that guarantees that the call to this API is idempotent.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 36.
Pattern:
^[a-zA-Z0-9-]+$
Required: No
- CustomerMetadataProperties
-
The metadata properties associated with the model package versions.
Type: String to string map
Map Entries: Maximum number of 50 items.
Key Length Constraints: Minimum length of 1. Maximum length of 128.
Key Pattern:
^([\p{L}\p{Z}\p{N}_.:\/=+\-@]*)${1,128}
Value Length Constraints: Minimum length of 1. Maximum length of 256.
Value Pattern:
^([\p{L}\p{Z}\p{N}_.:\/=+\-@]*)${1,256}
Required: No
- CustomerMetadataPropertiesToRemove
-
The metadata properties associated with the model package versions to remove.
Type: Array of strings
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern:
^([\p{L}\p{Z}\p{N}_.:\/=+\-@]*)${1,128}
Required: No
- InferenceSpecification
-
Specifies details about inference jobs that you can run with models based on this model package, including the following information:
-
The Amazon ECR paths of containers that contain the inference code and model artifacts.
-
The instance types that the model package supports for transform jobs and real-time endpoints used for inference.
-
The input and output content formats that the model package supports for inference.
Type: InferenceSpecification object
Required: No
-
- ModelApprovalStatus
-
The approval status of the model.
Type: String
Valid Values:
Approved | Rejected | PendingManualApproval
Required: No
- ModelCard
-
The model card associated with the model package. Since
ModelPackageModelCard
is tied to a model package, it is a specific usage of a model card and its schema is simplified compared to the schema ofModelCard
. TheModelPackageModelCard
schema does not includemodel_package_details
, andmodel_overview
is composed of themodel_creator
andmodel_artifact
properties. For more information about the model package model card schema, see Model package model card schema. For more information about the model card associated with the model package, see View the Details of a Model Version.Type: ModelPackageModelCard object
Required: No
- ModelLifeCycle
-
A structure describing the current state of the model in its life cycle.
Type: ModelLifeCycle object
Required: No
- ModelPackageArn
-
The Amazon Resource Name (ARN) of the model package.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 2048.
Pattern:
^arn:aws(-cn|-us-gov|-iso-f)?:sagemaker:[a-z0-9\-]{9,16}:[0-9]{12}:model-package/[\S]{1,2048}$
Required: Yes
- SourceUri
-
The URI of the source for the model package.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 1024.
Pattern:
[\p{L}\p{M}\p{Z}\p{N}\p{P}]{0,1024}
Required: No
Response Syntax
{
"ModelPackageArn": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- ModelPackageArn
-
The Amazon Resource Name (ARN) of the model.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 2048.
Pattern:
^arn:aws(-cn|-us-gov|-iso-f)?:sagemaker:[a-z0-9\-]{9,16}:[0-9]{12}:model-package/[\S]{1,2048}$
Errors
For information about the errors that are common to all actions, see Common Errors.
- ConflictException
-
There was a conflict when you attempted to modify a SageMaker entity such as an
Experiment
orArtifact
.HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific Amazon SDKs, see the following: