Class CfnInferenceComponent
Creates an inference component, which is a SageMaker AI hosting object that you can use to deploy a model to an endpoint.
Inherited Members
Namespace: Amazon.CDK.AWS.Sagemaker
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnInferenceComponent : CfnResource, IInspectable, ITaggableV2
Syntax (vb)
Public Class CfnInferenceComponent Inherits CfnResource Implements IInspectable, ITaggableV2
Remarks
In the inference component settings, you specify the model, the endpoint, and how the model utilizes the resources that the endpoint hosts. You can optimize resource utilization by tailoring how the required CPU cores, accelerators, and memory are allocated. You can deploy multiple inference components to an endpoint, where each inference component contains one model and the resource utilization needs for that individual model. After you deploy an inference component, you can directly invoke the associated model when you use the InvokeEndpoint API action.
CloudformationResource: AWS::SageMaker::InferenceComponent
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;
var cfnInferenceComponent = new CfnInferenceComponent(this, "MyCfnInferenceComponent", new CfnInferenceComponentProps {
EndpointName = "endpointName",
Specification = new InferenceComponentSpecificationProperty {
BaseInferenceComponentName = "baseInferenceComponentName",
ComputeResourceRequirements = new InferenceComponentComputeResourceRequirementsProperty {
MaxMemoryRequiredInMb = 123,
MinMemoryRequiredInMb = 123,
NumberOfAcceleratorDevicesRequired = 123,
NumberOfCpuCoresRequired = 123
},
Container = new InferenceComponentContainerSpecificationProperty {
ArtifactUrl = "artifactUrl",
DeployedImage = new DeployedImageProperty {
ResolutionTime = "resolutionTime",
ResolvedImage = "resolvedImage",
SpecifiedImage = "specifiedImage"
},
Environment = new Dictionary<string, string> {
{ "environmentKey", "environment" }
},
Image = "image"
},
ModelName = "modelName",
StartupParameters = new InferenceComponentStartupParametersProperty {
ContainerStartupHealthCheckTimeoutInSeconds = 123,
ModelDataDownloadTimeoutInSeconds = 123
}
},
// the properties below are optional
DeploymentConfig = new InferenceComponentDeploymentConfigProperty {
AutoRollbackConfiguration = new AutoRollbackConfigurationProperty {
Alarms = new [] { new AlarmProperty {
AlarmName = "alarmName"
} }
},
RollingUpdatePolicy = new InferenceComponentRollingUpdatePolicyProperty {
MaximumBatchSize = new InferenceComponentCapacitySizeProperty {
Type = "type",
Value = 123
},
MaximumExecutionTimeoutInSeconds = 123,
RollbackMaximumBatchSize = new InferenceComponentCapacitySizeProperty {
Type = "type",
Value = 123
},
WaitIntervalInSeconds = 123
}
},
EndpointArn = "endpointArn",
InferenceComponentName = "inferenceComponentName",
RuntimeConfig = new InferenceComponentRuntimeConfigProperty {
CopyCount = 123,
CurrentCopyCount = 123,
DesiredCopyCount = 123
},
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
VariantName = "variantName"
});
Synopsis
Constructors
CfnInferenceComponent(Construct, string, ICfnInferenceComponentProps) | Creates an inference component, which is a SageMaker AI hosting object that you can use to deploy a model to an endpoint. |
Properties
AttrCreationTime | The time when the inference component was created. |
AttrFailureReason | The failure reason if the inference component is in a failed state. |
AttrInferenceComponentArn | The Amazon Resource Name (ARN) of the inference component. |
AttrInferenceComponentStatus | The status of the inference component. |
AttrLastModifiedTime | The time when the inference component was last updated. |
AttrRuntimeConfigCurrentCopyCount | The number of runtime copies of the model container that are currently deployed. |
AttrRuntimeConfigDesiredCopyCount | The number of runtime copies of the model container that you requested to deploy with the inference component. |
AttrSpecificationContainerDeployedImage | Creates an inference component, which is a SageMaker AI hosting object that you can use to deploy a model to an endpoint. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CdkTagManager | Tag Manager which manages the tags for this resource. |
CfnProperties | Creates an inference component, which is a SageMaker AI hosting object that you can use to deploy a model to an endpoint. |
DeploymentConfig | The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations. |
EndpointArn | The Amazon Resource Name (ARN) of the endpoint that hosts the inference component. |
EndpointName | The name of the endpoint that hosts the inference component. |
InferenceComponentName | The name of the inference component. |
RuntimeConfig | The runtime config for the inference component. |
Specification | The specification for the inference component. |
Tags | An array of tags to apply to the resource. |
VariantName | The name of the production variant that hosts the inference component. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<string, object>) | Creates an inference component, which is a SageMaker AI hosting object that you can use to deploy a model to an endpoint. |
Constructors
CfnInferenceComponent(Construct, string, ICfnInferenceComponentProps)
Creates an inference component, which is a SageMaker AI hosting object that you can use to deploy a model to an endpoint.
public CfnInferenceComponent(Construct scope, string id, ICfnInferenceComponentProps props)
Parameters
- scope Construct
Scope in which this resource is defined.
- id string
Construct identifier for this resource (unique in its scope).
- props ICfnInferenceComponentProps
Resource properties.
Remarks
In the inference component settings, you specify the model, the endpoint, and how the model utilizes the resources that the endpoint hosts. You can optimize resource utilization by tailoring how the required CPU cores, accelerators, and memory are allocated. You can deploy multiple inference components to an endpoint, where each inference component contains one model and the resource utilization needs for that individual model. After you deploy an inference component, you can directly invoke the associated model when you use the InvokeEndpoint API action.
CloudformationResource: AWS::SageMaker::InferenceComponent
ExampleMetadata: fixture=_generated
Properties
AttrCreationTime
The time when the inference component was created.
public virtual string AttrCreationTime { get; }
Property Value
Remarks
CloudformationAttribute: CreationTime
AttrFailureReason
The failure reason if the inference component is in a failed state.
public virtual string AttrFailureReason { get; }
Property Value
Remarks
CloudformationAttribute: FailureReason
AttrInferenceComponentArn
The Amazon Resource Name (ARN) of the inference component.
public virtual string AttrInferenceComponentArn { get; }
Property Value
Remarks
CloudformationAttribute: InferenceComponentArn
AttrInferenceComponentStatus
The status of the inference component.
public virtual string AttrInferenceComponentStatus { get; }
Property Value
Remarks
CloudformationAttribute: InferenceComponentStatus
AttrLastModifiedTime
The time when the inference component was last updated.
public virtual string AttrLastModifiedTime { get; }
Property Value
Remarks
CloudformationAttribute: LastModifiedTime
AttrRuntimeConfigCurrentCopyCount
The number of runtime copies of the model container that are currently deployed.
public virtual double AttrRuntimeConfigCurrentCopyCount { get; }
Property Value
Remarks
CloudformationAttribute: RuntimeConfig.CurrentCopyCount
AttrRuntimeConfigDesiredCopyCount
The number of runtime copies of the model container that you requested to deploy with the inference component.
public virtual double AttrRuntimeConfigDesiredCopyCount { get; }
Property Value
Remarks
CloudformationAttribute: RuntimeConfig.DesiredCopyCount
AttrSpecificationContainerDeployedImage
Creates an inference component, which is a SageMaker AI hosting object that you can use to deploy a model to an endpoint.
public virtual IResolvable AttrSpecificationContainerDeployedImage { get; }
Property Value
Remarks
CloudformationAttribute: Specification.Container.DeployedImage
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
Remarks
In the inference component settings, you specify the model, the endpoint, and how the model utilizes the resources that the endpoint hosts. You can optimize resource utilization by tailoring how the required CPU cores, accelerators, and memory are allocated. You can deploy multiple inference components to an endpoint, where each inference component contains one model and the resource utilization needs for that individual model. After you deploy an inference component, you can directly invoke the associated model when you use the InvokeEndpoint API action.
CloudformationResource: AWS::SageMaker::InferenceComponent
ExampleMetadata: fixture=_generated
CdkTagManager
Tag Manager which manages the tags for this resource.
public virtual TagManager CdkTagManager { get; }
Property Value
Remarks
In the inference component settings, you specify the model, the endpoint, and how the model utilizes the resources that the endpoint hosts. You can optimize resource utilization by tailoring how the required CPU cores, accelerators, and memory are allocated. You can deploy multiple inference components to an endpoint, where each inference component contains one model and the resource utilization needs for that individual model. After you deploy an inference component, you can directly invoke the associated model when you use the InvokeEndpoint API action.
CloudformationResource: AWS::SageMaker::InferenceComponent
ExampleMetadata: fixture=_generated
CfnProperties
Creates an inference component, which is a SageMaker AI hosting object that you can use to deploy a model to an endpoint.
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
Overrides
Remarks
In the inference component settings, you specify the model, the endpoint, and how the model utilizes the resources that the endpoint hosts. You can optimize resource utilization by tailoring how the required CPU cores, accelerators, and memory are allocated. You can deploy multiple inference components to an endpoint, where each inference component contains one model and the resource utilization needs for that individual model. After you deploy an inference component, you can directly invoke the associated model when you use the InvokeEndpoint API action.
CloudformationResource: AWS::SageMaker::InferenceComponent
ExampleMetadata: fixture=_generated
DeploymentConfig
The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.
public virtual object? DeploymentConfig { get; set; }
Property Value
Remarks
In the inference component settings, you specify the model, the endpoint, and how the model utilizes the resources that the endpoint hosts. You can optimize resource utilization by tailoring how the required CPU cores, accelerators, and memory are allocated. You can deploy multiple inference components to an endpoint, where each inference component contains one model and the resource utilization needs for that individual model. After you deploy an inference component, you can directly invoke the associated model when you use the InvokeEndpoint API action.
CloudformationResource: AWS::SageMaker::InferenceComponent
ExampleMetadata: fixture=_generated
EndpointArn
The Amazon Resource Name (ARN) of the endpoint that hosts the inference component.
public virtual string? EndpointArn { get; set; }
Property Value
Remarks
In the inference component settings, you specify the model, the endpoint, and how the model utilizes the resources that the endpoint hosts. You can optimize resource utilization by tailoring how the required CPU cores, accelerators, and memory are allocated. You can deploy multiple inference components to an endpoint, where each inference component contains one model and the resource utilization needs for that individual model. After you deploy an inference component, you can directly invoke the associated model when you use the InvokeEndpoint API action.
CloudformationResource: AWS::SageMaker::InferenceComponent
ExampleMetadata: fixture=_generated
EndpointName
The name of the endpoint that hosts the inference component.
public virtual string EndpointName { get; set; }
Property Value
Remarks
In the inference component settings, you specify the model, the endpoint, and how the model utilizes the resources that the endpoint hosts. You can optimize resource utilization by tailoring how the required CPU cores, accelerators, and memory are allocated. You can deploy multiple inference components to an endpoint, where each inference component contains one model and the resource utilization needs for that individual model. After you deploy an inference component, you can directly invoke the associated model when you use the InvokeEndpoint API action.
CloudformationResource: AWS::SageMaker::InferenceComponent
ExampleMetadata: fixture=_generated
InferenceComponentName
The name of the inference component.
public virtual string? InferenceComponentName { get; set; }
Property Value
Remarks
In the inference component settings, you specify the model, the endpoint, and how the model utilizes the resources that the endpoint hosts. You can optimize resource utilization by tailoring how the required CPU cores, accelerators, and memory are allocated. You can deploy multiple inference components to an endpoint, where each inference component contains one model and the resource utilization needs for that individual model. After you deploy an inference component, you can directly invoke the associated model when you use the InvokeEndpoint API action.
CloudformationResource: AWS::SageMaker::InferenceComponent
ExampleMetadata: fixture=_generated
RuntimeConfig
The runtime config for the inference component.
public virtual object? RuntimeConfig { get; set; }
Property Value
Remarks
In the inference component settings, you specify the model, the endpoint, and how the model utilizes the resources that the endpoint hosts. You can optimize resource utilization by tailoring how the required CPU cores, accelerators, and memory are allocated. You can deploy multiple inference components to an endpoint, where each inference component contains one model and the resource utilization needs for that individual model. After you deploy an inference component, you can directly invoke the associated model when you use the InvokeEndpoint API action.
CloudformationResource: AWS::SageMaker::InferenceComponent
ExampleMetadata: fixture=_generated
Specification
The specification for the inference component.
public virtual object Specification { get; set; }
Property Value
Remarks
In the inference component settings, you specify the model, the endpoint, and how the model utilizes the resources that the endpoint hosts. You can optimize resource utilization by tailoring how the required CPU cores, accelerators, and memory are allocated. You can deploy multiple inference components to an endpoint, where each inference component contains one model and the resource utilization needs for that individual model. After you deploy an inference component, you can directly invoke the associated model when you use the InvokeEndpoint API action.
CloudformationResource: AWS::SageMaker::InferenceComponent
ExampleMetadata: fixture=_generated
Tags
An array of tags to apply to the resource.
public virtual ICfnTag[]? Tags { get; set; }
Property Value
ICfnTag[]
Remarks
In the inference component settings, you specify the model, the endpoint, and how the model utilizes the resources that the endpoint hosts. You can optimize resource utilization by tailoring how the required CPU cores, accelerators, and memory are allocated. You can deploy multiple inference components to an endpoint, where each inference component contains one model and the resource utilization needs for that individual model. After you deploy an inference component, you can directly invoke the associated model when you use the InvokeEndpoint API action.
CloudformationResource: AWS::SageMaker::InferenceComponent
ExampleMetadata: fixture=_generated
VariantName
The name of the production variant that hosts the inference component.
public virtual string? VariantName { get; set; }
Property Value
Remarks
In the inference component settings, you specify the model, the endpoint, and how the model utilizes the resources that the endpoint hosts. You can optimize resource utilization by tailoring how the required CPU cores, accelerators, and memory are allocated. You can deploy multiple inference components to an endpoint, where each inference component contains one model and the resource utilization needs for that individual model. After you deploy an inference component, you can directly invoke the associated model when you use the InvokeEndpoint API action.
CloudformationResource: AWS::SageMaker::InferenceComponent
ExampleMetadata: fixture=_generated
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
Remarks
In the inference component settings, you specify the model, the endpoint, and how the model utilizes the resources that the endpoint hosts. You can optimize resource utilization by tailoring how the required CPU cores, accelerators, and memory are allocated. You can deploy multiple inference components to an endpoint, where each inference component contains one model and the resource utilization needs for that individual model. After you deploy an inference component, you can directly invoke the associated model when you use the InvokeEndpoint API action.
CloudformationResource: AWS::SageMaker::InferenceComponent
ExampleMetadata: fixture=_generated
RenderProperties(IDictionary<string, object>)
Creates an inference component, which is a SageMaker AI hosting object that you can use to deploy a model to an endpoint.
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props IDictionary<string, object>
Returns
Overrides
Remarks
In the inference component settings, you specify the model, the endpoint, and how the model utilizes the resources that the endpoint hosts. You can optimize resource utilization by tailoring how the required CPU cores, accelerators, and memory are allocated. You can deploy multiple inference components to an endpoint, where each inference component contains one model and the resource utilization needs for that individual model. After you deploy an inference component, you can directly invoke the associated model when you use the InvokeEndpoint API action.
CloudformationResource: AWS::SageMaker::InferenceComponent
ExampleMetadata: fixture=_generated