

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 多容器端點
<a name="multi-container-endpoints"></a>

SageMaker AI 多容器端點方便客戶在單一 SageMaker AI 端點上部署使用不同模型或架構的多個容器。容器可按順序作為推論管道執行，或者透過直接調用個別存取每個容器，以提高端點使用率並最佳化成本。

如需有關如何依序調用多容器端點中容器的資訊，請參閱[Amazon SageMaker AI 中的推論管道](inference-pipelines.md)。

如需有關調用多容器端點中特定容器的資訊，請參閱[透過直接調用調用多容器端點](multi-container-direct.md)

**Topics**
+ [建立多容器端點 (Boto 3)](multi-container-create.md)
+ [更新多容器端點](multi-container-update.md)
+ [透過直接調用調用多容器端點](multi-container-direct.md)
+ [具有直接調用的多容器端點的安全性](multi-container-security.md)
+ [具有直接調用的多容器端點指標](multi-container-metrics.md)
+ [自動擴展多容器端點](multi-container-auto-scaling.md)
+ [排解多容器端點問題](multi-container-troubleshooting.md)

下列政策只有在 `TargetContainerHostname`欄位的值符合其中一個指定規則表達式時，才能允許 `invoke_endpoint`請求。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Action": [
                "sagemaker:InvokeEndpoint"
            ],
            "Effect": "Allow",
            "Resource": "arn:aws:sagemaker:{{us-east-1}}:{{111122223333}}:endpoint/{{endpoint_name}}",
            "Condition": {
                "StringLike": {
                    "sagemaker:TargetModel": [
                        "customIps*",
                        "common*"
                    ]
                }
            }
        }
    ]
}
```

------

當 `TargetContainerHostname`欄位的值符合 `Deny`陳述式中指定的規則表達式之一時，下列政策會拒絕 `invoke_endpoint`請求。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Action": [
                "sagemaker:InvokeEndpoint"
            ],
            "Effect": "Allow",
            "Resource": "arn:aws:sagemaker:{{us-east-1}}:{{111122223333}}:endpoint/{{endpoint_name}}",
            "Condition": {
                "StringLike": {
                    "sagemaker:TargetModel": [
                        "{{model_name}}*"
                    ]
                }
            }
        },
        {
            "Action": [
                "sagemaker:InvokeEndpoint"
            ],
            "Effect": "Deny",
            "Resource": "arn:aws:sagemaker:{{us-east-1}}:{{111122223333}}:endpoint/{{endpoint_name}}",
            "Condition": {
                "StringLike": {
                    "sagemaker:TargetModel": [
                        "special-{{model_name}}*"
                    ]
                }
            }
        }
    ]
}
```

------

 如需有關 SageMaker AI 條件索引鍵的資訊，請參閱 *AWS Identity and Access Management 使用者指南*中的 [SageMaker AI 條件索引鍵](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazonsagemaker.html#amazonsagemaker-policy-keys)。