Skip to main content

inference_components

Creates, updates, deletes or gets an inference_component resource or lists inference_components in a region

Overview

Nameinference_components
TypeResource
DescriptionResource Type definition for AWS::SageMaker::InferenceComponent
Idawscc.sagemaker.inference_components

Fields

NameDatatypeDescription
inference_component_arnstringThe Amazon Resource Name (ARN) of the inference component
inference_component_namestringThe name of the inference component
endpoint_arnstringThe Amazon Resource Name (ARN) of the endpoint the inference component is associated with
endpoint_namestringThe name of the endpoint used to run the monitoring job.
variant_namestringThe name of the endpoint variant the inference component is associated with
failure_reasonstringThe failure reason if the inference component is in a failed state
specificationobjectThe specification for the inference component
runtime_configobjectThe runtime config for the inference component
deployment_configobjectThe deployment config for the inference component
inference_component_statusstring
creation_timestring
tagsarrayAn array of tags to apply to the resource
regionstringAWS region.

For more information, see AWS::SageMaker::InferenceComponent.

Methods

NameResourceAccessible byRequired Params
create_resourceinference_componentsINSERTEndpointName, Specification, region
delete_resourceinference_componentsDELETEIdentifier, region
update_resourceinference_componentsUPDATEIdentifier, PatchDocument, region
list_resourcesinference_components_list_onlySELECTregion
get_resourceinference_componentsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual inference_component.

SELECT
region,
inference_component_arn,
inference_component_name,
endpoint_arn,
endpoint_name,
variant_name,
failure_reason,
specification,
runtime_config,
deployment_config,
inference_component_status,
creation_time,
last_modified_time,
tags
FROM awscc.sagemaker.inference_components
WHERE
region = '{{ region }}' AND
Identifier = '{{ inference_component_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new inference_component resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.sagemaker.inference_components (
EndpointName,
Specification,
region
)
SELECT
'{{ endpoint_name }}',
'{{ specification }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a inference_component resource, using stack-deploy.

/*+ update */
UPDATE awscc.sagemaker.inference_components
SET PatchDocument = string('{{ {
"InferenceComponentName": inference_component_name,
"EndpointArn": endpoint_arn,
"EndpointName": endpoint_name,
"VariantName": variant_name,
"DeploymentConfig": deployment_config,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ inference_component_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.sagemaker.inference_components
WHERE
Identifier = '{{ inference_component_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:

ParameterDescription
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 inference_components resource, the following permissions are required:

sagemaker:AddTags,
sagemaker:ListTags,
sagemaker:CreateInferenceComponent,
sagemaker:DescribeInferenceComponent