Skip to content

Commit

Permalink
feat(client-sagemaker): SageMaker Inference Recommender now provides …
Browse files Browse the repository at this point in the history
…SupportedResponseMIMETypes from DescribeInferenceRecommendationsJob response
  • Loading branch information
awstools committed Aug 15, 2023
1 parent a85e9d6 commit e2e362f
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ export interface CreateEndpointCommandOutput extends CreateEndpointOutput, __Met
* uses the endpoint to provision resources and deploy models. You create the endpoint
* configuration with the <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpointConfig.html">CreateEndpointConfig</a> API. </p>
* <p> Use this API to deploy models using SageMaker hosting services. </p>
* <p>For an example that calls this method when deploying a model to SageMaker hosting services,
* see the <a href="https://github.com/aws/amazon-sagemaker-examples/blob/master/sagemaker-fundamentals/create-endpoint/create_endpoint.ipynb">Create Endpoint example notebook.</a>
* </p>
* <note>
* <p> You must not delete an <code>EndpointConfig</code> that is in use by an endpoint
* that is live or while the <code>UpdateEndpoint</code> or <code>CreateEndpoint</code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ export interface CreateInferenceRecommendationsJobCommandOutput
* ],
* DataInputConfig: "STRING_VALUE",
* SupportedEndpointType: "RealTime" || "Serverless",
* SupportedResponseMIMETypes: [ // RecommendationJobSupportedResponseMIMETypes
* "STRING_VALUE",
* ],
* },
* Endpoints: [ // Endpoints
* { // EndpointInfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ export interface DescribeInferenceRecommendationsJobCommandOutput
* // ],
* // DataInputConfig: "STRING_VALUE",
* // SupportedEndpointType: "RealTime" || "Serverless",
* // SupportedResponseMIMETypes: [ // RecommendationJobSupportedResponseMIMETypes
* // "STRING_VALUE",
* // ],
* // },
* // Endpoints: [ // Endpoints
* // { // EndpointInfo
Expand Down
10 changes: 10 additions & 0 deletions clients/client-sagemaker/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4394,6 +4394,12 @@ export interface RecommendationJobContainerConfig {
* By specifying a value for this field, you can receive a longer list of benchmarks for the desired endpoint type.</p>
*/
SupportedEndpointType?: RecommendationJobSupportedEndpointType | string;

/**
* @public
* <p>The supported MIME types for the output data.</p>
*/
SupportedResponseMIMETypes?: string[];
}

/**
Expand Down Expand Up @@ -7994,6 +8000,10 @@ export interface CreateModelPackageInput {
* @public
* <p>A list of key value pairs associated with the model. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services
* resources</a> in the <i>Amazon Web Services General Reference Guide</i>.</p>
* <p>If you supply <code>ModelPackageGroupName</code>, your model package belongs to the model group
* you specify and uses the tags associated with the model group. In this case, you cannot
* supply a <code>tag</code> argument.
* </p>
*/
Tags?: Tag[];

Expand Down
4 changes: 4 additions & 0 deletions clients/client-sagemaker/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21722,6 +21722,8 @@ const se_QueryLineageRequest = (input: QueryLineageRequest, context: __SerdeCont

// se_RecommendationJobSupportedInstanceTypes omitted.

// se_RecommendationJobSupportedResponseMIMETypes omitted.

// se_RecommendationJobVpcConfig omitted.

// se_RecommendationJobVpcSecurityGroupIds omitted.
Expand Down Expand Up @@ -27658,6 +27660,8 @@ const de_RecommendationJobInferenceBenchmark = (

// de_RecommendationJobSupportedInstanceTypes omitted.

// de_RecommendationJobSupportedResponseMIMETypes omitted.

// de_RecommendationJobVpcConfig omitted.

// de_RecommendationJobVpcSecurityGroupIds omitted.
Expand Down
26 changes: 24 additions & 2 deletions codegen/sdk-codegen/aws-models/sagemaker.json
Original file line number Diff line number Diff line change
Expand Up @@ -7780,7 +7780,7 @@
}
],
"traits": {
"smithy.api#documentation": "<p>Creates an endpoint using the endpoint configuration specified in the request. SageMaker\n uses the endpoint to provision resources and deploy models. You create the endpoint\n configuration with the <a href=\"https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpointConfig.html\">CreateEndpointConfig</a> API. </p>\n <p> Use this API to deploy models using SageMaker hosting services. </p>\n <p>For an example that calls this method when deploying a model to SageMaker hosting services,\n see the <a href=\"https://github.com/aws/amazon-sagemaker-examples/blob/master/sagemaker-fundamentals/create-endpoint/create_endpoint.ipynb\">Create Endpoint example notebook.</a>\n </p>\n <note>\n <p> You must not delete an <code>EndpointConfig</code> that is in use by an endpoint\n that is live or while the <code>UpdateEndpoint</code> or <code>CreateEndpoint</code>\n operations are being performed on the endpoint. To update an endpoint, you must\n create a new <code>EndpointConfig</code>.</p>\n </note>\n <p>The endpoint name must be unique within an Amazon Web Services Region in your\n Amazon Web Services account. </p>\n <p>When it receives the request, SageMaker creates the endpoint, launches the resources (ML\n compute instances), and deploys the model(s) on them. </p>\n <note>\n <p>When you call <a href=\"https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpoint.html\">CreateEndpoint</a>, a load call is made to DynamoDB to verify that your\n endpoint configuration exists. When you read data from a DynamoDB table supporting\n <a href=\"https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html\">\n <code>Eventually Consistent Reads</code>\n </a>, the response might not\n reflect the results of a recently completed write operation. The response might\n include some stale data. If the dependent entities are not yet in DynamoDB, this\n causes a validation error. If you repeat your read request after a short time, the\n response should return the latest data. So retry logic is recommended to handle\n these possible issues. We also recommend that customers call <a href=\"https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeEndpointConfig.html\">DescribeEndpointConfig</a> before calling <a href=\"https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpoint.html\">CreateEndpoint</a> to minimize the potential impact of a DynamoDB\n eventually consistent read.</p>\n </note>\n <p>When SageMaker receives the request, it sets the endpoint status to\n <code>Creating</code>. After it creates the endpoint, it sets the status to\n <code>InService</code>. SageMaker can then process incoming requests for inferences. To\n check the status of an endpoint, use the <a href=\"https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeEndpoint.html\">DescribeEndpoint</a> API.</p>\n <p>If any of the models hosted at this endpoint get model data from an Amazon S3 location,\n SageMaker uses Amazon Web Services Security Token Service to download model artifacts from the\n S3 path you provided. Amazon Web Services STS is activated in your Amazon Web Services\n account by default. If you previously deactivated Amazon Web Services STS for a region,\n you need to reactivate Amazon Web Services STS for that region. For more information, see\n <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html\">Activating and\n Deactivating Amazon Web Services STS in an Amazon Web Services Region</a> in the\n <i>Amazon Web Services Identity and Access Management User\n Guide</i>.</p>\n <note>\n <p> To add the IAM role policies for using this API operation, go to the <a href=\"https://console.aws.amazon.com/iam/\">IAM console</a>, and choose\n Roles in the left navigation pane. Search the IAM role that you want to grant\n access to use the <a href=\"https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpoint.html\">CreateEndpoint</a> and <a href=\"https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpointConfig.html\">CreateEndpointConfig</a> API operations, add the following policies to the\n role. </p>\n <ul>\n <li>\n <p>Option 1: For a full SageMaker access, search and attach the\n <code>AmazonSageMakerFullAccess</code> policy.</p>\n </li>\n <li>\n <p>Option 2: For granting a limited access to an IAM role, paste the\n following Action elements manually into the JSON file of the IAM role: </p>\n <p>\n <code>\"Action\": [\"sagemaker:CreateEndpoint\",\n \"sagemaker:CreateEndpointConfig\"]</code>\n </p>\n <p>\n <code>\"Resource\": [</code>\n </p>\n <p>\n <code>\"arn:aws:sagemaker:region:account-id:endpoint/endpointName\"</code>\n </p>\n <p>\n <code>\"arn:aws:sagemaker:region:account-id:endpoint-config/endpointConfigName\"</code>\n </p>\n <p>\n <code>]</code>\n </p>\n <p>For more information, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/api-permissions-reference.html\">SageMaker API\n Permissions: Actions, Permissions, and Resources\n Reference</a>.</p>\n </li>\n </ul>\n </note>"
"smithy.api#documentation": "<p>Creates an endpoint using the endpoint configuration specified in the request. SageMaker\n uses the endpoint to provision resources and deploy models. You create the endpoint\n configuration with the <a href=\"https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpointConfig.html\">CreateEndpointConfig</a> API. </p>\n <p> Use this API to deploy models using SageMaker hosting services. </p>\n <note>\n <p> You must not delete an <code>EndpointConfig</code> that is in use by an endpoint\n that is live or while the <code>UpdateEndpoint</code> or <code>CreateEndpoint</code>\n operations are being performed on the endpoint. To update an endpoint, you must\n create a new <code>EndpointConfig</code>.</p>\n </note>\n <p>The endpoint name must be unique within an Amazon Web Services Region in your\n Amazon Web Services account. </p>\n <p>When it receives the request, SageMaker creates the endpoint, launches the resources (ML\n compute instances), and deploys the model(s) on them. </p>\n <note>\n <p>When you call <a href=\"https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpoint.html\">CreateEndpoint</a>, a load call is made to DynamoDB to verify that your\n endpoint configuration exists. When you read data from a DynamoDB table supporting\n <a href=\"https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html\">\n <code>Eventually Consistent Reads</code>\n </a>, the response might not\n reflect the results of a recently completed write operation. The response might\n include some stale data. If the dependent entities are not yet in DynamoDB, this\n causes a validation error. If you repeat your read request after a short time, the\n response should return the latest data. So retry logic is recommended to handle\n these possible issues. We also recommend that customers call <a href=\"https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeEndpointConfig.html\">DescribeEndpointConfig</a> before calling <a href=\"https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpoint.html\">CreateEndpoint</a> to minimize the potential impact of a DynamoDB\n eventually consistent read.</p>\n </note>\n <p>When SageMaker receives the request, it sets the endpoint status to\n <code>Creating</code>. After it creates the endpoint, it sets the status to\n <code>InService</code>. SageMaker can then process incoming requests for inferences. To\n check the status of an endpoint, use the <a href=\"https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeEndpoint.html\">DescribeEndpoint</a> API.</p>\n <p>If any of the models hosted at this endpoint get model data from an Amazon S3 location,\n SageMaker uses Amazon Web Services Security Token Service to download model artifacts from the\n S3 path you provided. Amazon Web Services STS is activated in your Amazon Web Services\n account by default. If you previously deactivated Amazon Web Services STS for a region,\n you need to reactivate Amazon Web Services STS for that region. For more information, see\n <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html\">Activating and\n Deactivating Amazon Web Services STS in an Amazon Web Services Region</a> in the\n <i>Amazon Web Services Identity and Access Management User\n Guide</i>.</p>\n <note>\n <p> To add the IAM role policies for using this API operation, go to the <a href=\"https://console.aws.amazon.com/iam/\">IAM console</a>, and choose\n Roles in the left navigation pane. Search the IAM role that you want to grant\n access to use the <a href=\"https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpoint.html\">CreateEndpoint</a> and <a href=\"https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpointConfig.html\">CreateEndpointConfig</a> API operations, add the following policies to the\n role. </p>\n <ul>\n <li>\n <p>Option 1: For a full SageMaker access, search and attach the\n <code>AmazonSageMakerFullAccess</code> policy.</p>\n </li>\n <li>\n <p>Option 2: For granting a limited access to an IAM role, paste the\n following Action elements manually into the JSON file of the IAM role: </p>\n <p>\n <code>\"Action\": [\"sagemaker:CreateEndpoint\",\n \"sagemaker:CreateEndpointConfig\"]</code>\n </p>\n <p>\n <code>\"Resource\": [</code>\n </p>\n <p>\n <code>\"arn:aws:sagemaker:region:account-id:endpoint/endpointName\"</code>\n </p>\n <p>\n <code>\"arn:aws:sagemaker:region:account-id:endpoint-config/endpointConfigName\"</code>\n </p>\n <p>\n <code>]</code>\n </p>\n <p>For more information, see <a href=\"https://docs.aws.amazon.com/sagemaker/latest/dg/api-permissions-reference.html\">SageMaker API\n Permissions: Actions, Permissions, and Resources\n Reference</a>.</p>\n </li>\n </ul>\n </note>"
}
},
"com.amazonaws.sagemaker#CreateEndpointConfig": {
Expand Down Expand Up @@ -9486,7 +9486,7 @@
"Tags": {
"target": "com.amazonaws.sagemaker#TagList",
"traits": {
"smithy.api#documentation": "<p>A list of key value pairs associated with the model. For more information, see <a href=\"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html\">Tagging Amazon Web Services\n resources</a> in the <i>Amazon Web Services General Reference Guide</i>.</p>"
"smithy.api#documentation": "<p>A list of key value pairs associated with the model. For more information, see <a href=\"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html\">Tagging Amazon Web Services\n resources</a> in the <i>Amazon Web Services General Reference Guide</i>.</p>\n <p>If you supply <code>ModelPackageGroupName</code>, your model package belongs to the model group\n\t you specify and uses the tags associated with the model group. In this case, you cannot\n\t supply a <code>tag</code> argument.\n</p>"
}
},
"ModelApprovalStatus": {
Expand Down Expand Up @@ -47049,6 +47049,12 @@
"traits": {
"smithy.api#documentation": "<p>The endpoint type to receive recommendations for. By default this is null, and the results of \n the inference recommendation job return a combined list of both real-time and serverless benchmarks.\n By specifying a value for this field, you can receive a longer list of benchmarks for the desired endpoint type.</p>"
}
},
"SupportedResponseMIMETypes": {
"target": "com.amazonaws.sagemaker#RecommendationJobSupportedResponseMIMETypes",
"traits": {
"smithy.api#documentation": "<p>The supported MIME types for the output data.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -47350,6 +47356,22 @@
"target": "com.amazonaws.sagemaker#String"
}
},
"com.amazonaws.sagemaker#RecommendationJobSupportedResponseMIMEType": {
"type": "string",
"traits": {
"smithy.api#length": {
"min": 0,
"max": 1024
},
"smithy.api#pattern": "^[-\\w]+\\/.+$"
}
},
"com.amazonaws.sagemaker#RecommendationJobSupportedResponseMIMETypes": {
"type": "list",
"member": {
"target": "com.amazonaws.sagemaker#RecommendationJobSupportedResponseMIMEType"
}
},
"com.amazonaws.sagemaker#RecommendationJobType": {
"type": "enum",
"members": {
Expand Down

0 comments on commit e2e362f

Please sign in to comment.