@@ -2312,11 +2312,16 @@ def create_endpoint_config_from_existing(
23122312 existing_config_name (str): Name of the existing Amazon SageMaker endpoint
23132313 configuration.
23142314 new_tags(List[dict[str, str]]): Optional. The list of tags to add to the endpoint
2315- config.
2315+ config. If not specified, the tags of the existing endpoint configuration are used.
2316+ If any of the existing tags are reserved AWS ones (i.e. begin with "aws"),
2317+ they are not carried over to the new endpoint configuration.
23162318 new_kms_key (str): The KMS key that is used to encrypt the data on the storage volume
2317- attached to the instance hosting the endpoint.
2319+ attached to the instance hosting the endpoint (default: None). If not specified,
2320+ the KMS key of the existing endpoint configuration is used.
23182321 new_data_capture_config_dict (dict): Specifies configuration related to Endpoint data
2319- capture for use with Amazon SageMaker Model Monitoring. Default: None.
2322+ capture for use with Amazon SageMaker Model Monitoring (default: None).
2323+ If not specified, the data capture configuration of the existing
2324+ endpoint configuration is used.
23202325
23212326 Returns:
23222327 str: Name of the endpoint point configuration created.
@@ -2328,17 +2333,14 @@ def create_endpoint_config_from_existing(
23282333 EndpointConfigName = existing_config_name
23292334 )
23302335
2331- existing_tags = self .sagemaker_client .list_tags (
2332- ResourceArn = existing_endpoint_config_desc ["EndpointConfigArn" ]
2333- )
2334-
2335- request_tags = new_tags or existing_tags ["Tags" ]
2336-
23372336 request = {
23382337 "EndpointConfigName" : new_config_name ,
23392338 "ProductionVariants" : existing_endpoint_config_desc ["ProductionVariants" ],
23402339 }
23412340
2341+ request_tags = new_tags or self .list_tags (
2342+ existing_endpoint_config_desc ["EndpointConfigArn" ]
2343+ )
23422344 if request_tags :
23432345 request ["Tags" ] = request_tags
23442346
0 commit comments