Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service/sagemaker: Remove deprecated (helper/schema.ResourceData).Partial() and (helper/schema.ResourceData).SetPartial() #12462

Merged
merged 1 commit into from
Apr 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions aws/resource_aws_sagemaker_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,13 @@ func resourceAwsSagemakerEndpointRead(d *schema.ResourceData, meta interface{})
func resourceAwsSagemakerEndpointUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).sagemakerconn

d.Partial(true)

if d.HasChange("tags") {
o, n := d.GetChange("tags")

if err := keyvaluetags.SagemakerUpdateTags(conn, d.Get("arn").(string), o, n); err != nil {
return fmt.Errorf("error updating Sagemaker Endpoint (%s) tags: %s", d.Id(), err)
}
}
d.SetPartial("tags")

if d.HasChange("endpoint_config_name") {
modifyOpts := &sagemaker.UpdateEndpointInput{
Expand All @@ -153,7 +150,6 @@ func resourceAwsSagemakerEndpointUpdate(d *schema.ResourceData, meta interface{}
if _, err := conn.UpdateEndpoint(modifyOpts); err != nil {
return fmt.Errorf("error updating SageMaker Endpoint (%s): %s", d.Id(), err)
}
d.SetPartial("endpoint_config_name")

describeInput := &sagemaker.DescribeEndpointInput{
EndpointName: aws.String(d.Id()),
Expand All @@ -165,8 +161,6 @@ func resourceAwsSagemakerEndpointUpdate(d *schema.ResourceData, meta interface{}
}
}

d.Partial(false)

return resourceAwsSagemakerEndpointRead(d, meta)
}

Expand Down
4 changes: 0 additions & 4 deletions aws/resource_aws_sagemaker_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,6 @@ func flattenSageMakerVpcConfigResponse(vpcConfig *sagemaker.VpcConfig) []map[str
func resourceAwsSagemakerModelUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).sagemakerconn

d.Partial(true)

if d.HasChange("tags") {
o, n := d.GetChange("tags")

Expand All @@ -291,8 +289,6 @@ func resourceAwsSagemakerModelUpdate(d *schema.ResourceData, meta interface{}) e
}
}

d.Partial(false)

return resourceAwsSagemakerModelRead(d, meta)
}

Expand Down
5 changes: 0 additions & 5 deletions aws/resource_aws_sagemaker_notebook_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,16 +214,13 @@ func resourceAwsSagemakerNotebookInstanceRead(d *schema.ResourceData, meta inter
func resourceAwsSagemakerNotebookInstanceUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).sagemakerconn

d.Partial(true)

if d.HasChange("tags") {
o, n := d.GetChange("tags")

if err := keyvaluetags.SagemakerUpdateTags(conn, d.Get("arn").(string), o, n); err != nil {
return fmt.Errorf("error updating Sagemaker Notebook Instance (%s) tags: %s", d.Id(), err)
}
}
d.SetPartial("tags")

hasChanged := false
// Update
Expand Down Expand Up @@ -325,8 +322,6 @@ func resourceAwsSagemakerNotebookInstanceUpdate(d *schema.ResourceData, meta int
}
}

d.Partial(false)

return resourceAwsSagemakerNotebookInstanceRead(d, meta)
}

Expand Down