From 3586a1a9b5ed6f121a64f022c22b405476f44d24 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Tue, 30 Jun 2020 15:48:58 -0400 Subject: [PATCH] Remove "Removed" attributes --- aws/data_source_aws_iam_role.go | 15 --- aws/data_source_aws_region.go | 7 - aws/resource_aws_api_gateway_api_key.go | 19 --- aws/resource_aws_api_gateway_integration.go | 6 - ...ce_aws_api_gateway_integration_response.go | 6 - aws/resource_aws_api_gateway_method.go | 14 -- ...esource_aws_api_gateway_method_response.go | 6 - aws/resource_aws_appautoscaling_policy.go | 41 ------ aws/resource_aws_appmesh_virtual_node.go | 15 --- aws/resource_aws_appmesh_virtual_router.go | 8 -- aws/resource_aws_autoscaling_policy.go | 5 - aws/resource_aws_batch_compute_environment.go | 5 - aws/resource_aws_cloudfront_distribution.go | 127 ------------------ aws/resource_aws_dx_lag.go | 7 - aws/resource_aws_ecs_service.go | 27 ---- aws/resource_aws_efs_file_system.go | 7 - aws/resource_aws_elasticache_cluster.go | 8 -- aws/resource_aws_instance.go | 6 - aws/resource_aws_network_acl.go | 6 - aws/resource_aws_redshift_cluster.go | 21 --- aws/resource_aws_route53_zone.go | 16 --- ...resource_aws_wafregional_byte_match_set.go | 38 ------ aws/structure.go | 52 ------- 23 files changed, 462 deletions(-) diff --git a/aws/data_source_aws_iam_role.go b/aws/data_source_aws_iam_role.go index 9f3a41476d3..cf90643c976 100644 --- a/aws/data_source_aws_iam_role.go +++ b/aws/data_source_aws_iam_role.go @@ -21,11 +21,6 @@ func dataSourceAwsIAMRole() *schema.Resource { Type: schema.TypeString, Computed: true, }, - "assume_role_policy_document": { - Type: schema.TypeString, - Computed: true, - Removed: "Use `assume_role_policy` instead", - }, "assume_role_policy": { Type: schema.TypeString, Computed: true, @@ -38,11 +33,6 @@ func dataSourceAwsIAMRole() *schema.Resource { Type: schema.TypeString, Computed: true, }, - "role_id": { - Type: schema.TypeString, - Computed: true, - Removed: "Use `unique_id` instead", - }, "unique_id": { Type: schema.TypeString, Computed: true, @@ -51,11 +41,6 @@ func dataSourceAwsIAMRole() *schema.Resource { Type: schema.TypeString, Computed: true, }, - "role_name": { - Type: schema.TypeString, - Optional: true, - Removed: "Use `name` instead", - }, "name": { Type: schema.TypeString, Required: true, diff --git a/aws/data_source_aws_region.go b/aws/data_source_aws_region.go index dbafe3c4815..88f1aac6760 100644 --- a/aws/data_source_aws_region.go +++ b/aws/data_source_aws_region.go @@ -19,13 +19,6 @@ func dataSourceAwsRegion() *schema.Resource { Computed: true, }, - "current": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - Removed: "Defaults to current provider region if no other filtering is enabled", - }, - "endpoint": { Type: schema.TypeString, Optional: true, diff --git a/aws/resource_aws_api_gateway_api_key.go b/aws/resource_aws_api_gateway_api_key.go index eba07fa80f3..e88e2985ab5 100644 --- a/aws/resource_aws_api_gateway_api_key.go +++ b/aws/resource_aws_api_gateway_api_key.go @@ -42,25 +42,6 @@ func resourceAwsApiGatewayApiKey() *schema.Resource { Default: true, }, - "stage_key": { - Type: schema.TypeSet, - Optional: true, - Removed: "Since the API Gateway usage plans feature was launched on August 11, 2016, usage plans are now required to associate an API key with an API stage", - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "rest_api_id": { - Type: schema.TypeString, - Required: true, - }, - - "stage_name": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "created_date": { Type: schema.TypeString, Computed: true, diff --git a/aws/resource_aws_api_gateway_integration.go b/aws/resource_aws_api_gateway_integration.go index 2c9b811cc18..4995721ac01 100644 --- a/aws/resource_aws_api_gateway_integration.go +++ b/aws/resource_aws_api_gateway_integration.go @@ -114,12 +114,6 @@ func resourceAwsApiGatewayIntegration() *schema.Resource { Optional: true, }, - "request_parameters_in_json": { - Type: schema.TypeString, - Optional: true, - Removed: "Use `request_parameters` argument instead", - }, - "content_handling": { Type: schema.TypeString, Optional: true, diff --git a/aws/resource_aws_api_gateway_integration_response.go b/aws/resource_aws_api_gateway_integration_response.go index 303cd107285..2eebf4cea42 100644 --- a/aws/resource_aws_api_gateway_integration_response.go +++ b/aws/resource_aws_api_gateway_integration_response.go @@ -78,12 +78,6 @@ func resourceAwsApiGatewayIntegrationResponse() *schema.Resource { Optional: true, }, - "response_parameters_in_json": { - Type: schema.TypeString, - Optional: true, - Removed: "Use `response_parameters` argument instead", - }, - "content_handling": { Type: schema.TypeString, Optional: true, diff --git a/aws/resource_aws_api_gateway_method.go b/aws/resource_aws_api_gateway_method.go index bfbe5af1dcb..cbeb37c0987 100644 --- a/aws/resource_aws_api_gateway_method.go +++ b/aws/resource_aws_api_gateway_method.go @@ -90,12 +90,6 @@ func resourceAwsApiGatewayMethod() *schema.Resource { Optional: true, }, - "request_parameters_in_json": { - Type: schema.TypeString, - Optional: true, - Removed: "Use `request_parameters` argument instead", - }, - "request_validator_id": { Type: schema.TypeString, Optional: true, @@ -216,14 +210,6 @@ func resourceAwsApiGatewayMethodUpdate(d *schema.ResourceData, meta interface{}) operations = append(operations, expandApiGatewayRequestResponseModelOperations(d, "request_models", "requestModels")...) } - if d.HasChange("request_parameters_in_json") { - ops, err := deprecatedExpandApiGatewayMethodParametersJSONOperations(d, "request_parameters_in_json", "requestParameters") - if err != nil { - return err - } - operations = append(operations, ops...) - } - if d.HasChange("request_parameters") { parameters := make(map[string]bool) var ok bool diff --git a/aws/resource_aws_api_gateway_method_response.go b/aws/resource_aws_api_gateway_method_response.go index cf8e9319f3f..08aa6573078 100644 --- a/aws/resource_aws_api_gateway_method_response.go +++ b/aws/resource_aws_api_gateway_method_response.go @@ -76,12 +76,6 @@ func resourceAwsApiGatewayMethodResponse() *schema.Resource { Elem: &schema.Schema{Type: schema.TypeBool}, Optional: true, }, - - "response_parameters_in_json": { - Type: schema.TypeString, - Optional: true, - Removed: "Use `response_parameters` argument instead", - }, }, } } diff --git a/aws/resource_aws_appautoscaling_policy.go b/aws/resource_aws_appautoscaling_policy.go index 612c1f98ea5..ac49a5ba36b 100644 --- a/aws/resource_aws_appautoscaling_policy.go +++ b/aws/resource_aws_appautoscaling_policy.go @@ -102,47 +102,6 @@ func resourceAwsAppautoscalingPolicy() *schema.Resource { }, }, }, - "adjustment_type": { - Type: schema.TypeString, - Optional: true, - Removed: "Use `step_scaling_policy_configuration` configuration block `adjustment_type` argument instead", - }, - "cooldown": { - Type: schema.TypeInt, - Optional: true, - Removed: "Use `step_scaling_policy_configuration` configuration block `cooldown` argument instead", - }, - "metric_aggregation_type": { - Type: schema.TypeString, - Optional: true, - Removed: "Use `step_scaling_policy_configuration` configuration block `metric_aggregation_type` argument instead", - }, - "min_adjustment_magnitude": { - Type: schema.TypeInt, - Optional: true, - Removed: "Use `step_scaling_policy_configuration` configuration block `min_adjustment_magnitude` argument instead", - }, - "step_adjustment": { - Type: schema.TypeSet, - Optional: true, - Removed: "Use `step_scaling_policy_configuration` configuration block `step_adjustment` configuration block instead", - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "metric_interval_lower_bound": { - Type: schema.TypeString, - Optional: true, - }, - "metric_interval_upper_bound": { - Type: schema.TypeString, - Optional: true, - }, - "scaling_adjustment": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - }, "target_tracking_scaling_policy_configuration": { Type: schema.TypeList, MaxItems: 1, diff --git a/aws/resource_aws_appmesh_virtual_node.go b/aws/resource_aws_appmesh_virtual_node.go index 0222722a4fc..08ab50ecbe5 100644 --- a/aws/resource_aws_appmesh_virtual_node.go +++ b/aws/resource_aws_appmesh_virtual_node.go @@ -51,14 +51,6 @@ func resourceAwsAppmeshVirtualNode() *schema.Resource { MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "backends": { - Type: schema.TypeSet, - Removed: "Use `backend` configuration blocks instead", - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "backend": { Type: schema.TypeSet, Optional: true, @@ -256,13 +248,6 @@ func resourceAwsAppmeshVirtualNode() *schema.Resource { ConflictsWith: []string{"spec.0.service_discovery.0.aws_cloud_map"}, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "service_name": { - Type: schema.TypeString, - Removed: "Use `hostname` argument instead", - Optional: true, - Computed: true, - }, - "hostname": { Type: schema.TypeString, Required: true, diff --git a/aws/resource_aws_appmesh_virtual_router.go b/aws/resource_aws_appmesh_virtual_router.go index 999b71ffa10..2df3d22aef1 100644 --- a/aws/resource_aws_appmesh_virtual_router.go +++ b/aws/resource_aws_appmesh_virtual_router.go @@ -49,14 +49,6 @@ func resourceAwsAppmeshVirtualRouter() *schema.Resource { MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "service_names": { - Type: schema.TypeSet, - Removed: "Use `aws_appmesh_virtual_service` resources instead", - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "listener": { Type: schema.TypeList, Required: true, diff --git a/aws/resource_aws_autoscaling_policy.go b/aws/resource_aws_autoscaling_policy.go index fc84a550557..ddef6d96030 100644 --- a/aws/resource_aws_autoscaling_policy.go +++ b/aws/resource_aws_autoscaling_policy.go @@ -71,11 +71,6 @@ func resourceAwsAutoscalingPolicy() *schema.Resource { Optional: true, ValidateFunc: validation.IntAtLeast(1), }, - "min_adjustment_step": { - Type: schema.TypeInt, - Optional: true, - Removed: "Use `min_adjustment_magnitude` argument instead", - }, "scaling_adjustment": { Type: schema.TypeInt, Optional: true, diff --git a/aws/resource_aws_batch_compute_environment.go b/aws/resource_aws_batch_compute_environment.go index cf006e4019b..e41c3956e82 100644 --- a/aws/resource_aws_batch_compute_environment.go +++ b/aws/resource_aws_batch_compute_environment.go @@ -174,11 +174,6 @@ func resourceAwsBatchComputeEnvironment() *schema.Resource { Type: schema.TypeString, Computed: true, }, - "ecc_cluster_arn": { - Type: schema.TypeString, - Computed: true, - Removed: "Use `ecs_cluster_arn` attribute instead", - }, "ecs_cluster_arn": { Type: schema.TypeString, Computed: true, diff --git a/aws/resource_aws_cloudfront_distribution.go b/aws/resource_aws_cloudfront_distribution.go index b5594b873a1..08a313e1b8a 100644 --- a/aws/resource_aws_cloudfront_distribution.go +++ b/aws/resource_aws_cloudfront_distribution.go @@ -38,133 +38,6 @@ func resourceAwsCloudFrontDistribution() *schema.Resource { Elem: &schema.Schema{Type: schema.TypeString}, Set: aliasesHash, }, - "cache_behavior": { - Type: schema.TypeSet, - Optional: true, - Removed: "Use `ordered_cache_behavior` configuration block(s) instead", - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "allowed_methods": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "cached_methods": { - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "compress": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "default_ttl": { - Type: schema.TypeInt, - Optional: true, - Default: 86400, - }, - "field_level_encryption_id": { - Type: schema.TypeString, - Optional: true, - }, - "forwarded_values": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "cookies": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "forward": { - Type: schema.TypeString, - Required: true, - }, - "whitelisted_names": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "headers": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "query_string": { - Type: schema.TypeBool, - Required: true, - }, - "query_string_cache_keys": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - }, - }, - "lambda_function_association": { - Type: schema.TypeSet, - Optional: true, - MaxItems: 4, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "event_type": { - Type: schema.TypeString, - Required: true, - }, - "lambda_arn": { - Type: schema.TypeString, - Required: true, - }, - "include_body": { - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - }, - }, - "max_ttl": { - Type: schema.TypeInt, - Optional: true, - Default: 31536000, - }, - "min_ttl": { - Type: schema.TypeInt, - Optional: true, - Default: 0, - }, - "path_pattern": { - Type: schema.TypeString, - Required: true, - }, - "smooth_streaming": { - Type: schema.TypeBool, - Optional: true, - }, - "target_origin_id": { - Type: schema.TypeString, - Required: true, - }, - "trusted_signers": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "viewer_protocol_policy": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, "ordered_cache_behavior": { Type: schema.TypeList, Optional: true, diff --git a/aws/resource_aws_dx_lag.go b/aws/resource_aws_dx_lag.go index 28ae8174a3f..d6e600fc42a 100644 --- a/aws/resource_aws_dx_lag.go +++ b/aws/resource_aws_dx_lag.go @@ -43,13 +43,6 @@ func resourceAwsDxLag() *schema.Resource { Required: true, ForceNew: true, }, - "number_of_connections": { - Type: schema.TypeInt, - Optional: true, - Computed: true, - ForceNew: true, - Removed: "Use `aws_dx_connection` and `aws_dx_connection_association` resources instead", - }, "force_destroy": { Type: schema.TypeBool, Optional: true, diff --git a/aws/resource_aws_ecs_service.go b/aws/resource_aws_ecs_service.go index 8f372f88f06..a88be63d2a1 100644 --- a/aws/resource_aws_ecs_service.go +++ b/aws/resource_aws_ecs_service.go @@ -252,33 +252,6 @@ func resourceAwsEcsService() *schema.Resource { }, }, }, - "placement_strategy": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - MaxItems: 5, - Removed: "Use `ordered_placement_strategy` configuration block(s) instead", - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - ecs.PlacementStrategyTypeBinpack, - ecs.PlacementStrategyTypeRandom, - ecs.PlacementStrategyTypeSpread, - }, false), - }, - "field": { - Type: schema.TypeString, - Optional: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - return strings.EqualFold(old, new) - }, - }, - }, - }, - }, "ordered_placement_strategy": { Type: schema.TypeList, Optional: true, diff --git a/aws/resource_aws_efs_file_system.go b/aws/resource_aws_efs_file_system.go index b3650dd6f58..c6e7be37041 100644 --- a/aws/resource_aws_efs_file_system.go +++ b/aws/resource_aws_efs_file_system.go @@ -40,13 +40,6 @@ func resourceAwsEfsFileSystem() *schema.Resource { ValidateFunc: validation.StringLenBetween(0, 64), }, - "reference_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - Removed: "Use `creation_token` argument instead", - }, - "performance_mode": { Type: schema.TypeString, Optional: true, diff --git a/aws/resource_aws_elasticache_cluster.go b/aws/resource_aws_elasticache_cluster.go index 957d3f674be..29a4c106af7 100644 --- a/aws/resource_aws_elasticache_cluster.go +++ b/aws/resource_aws_elasticache_cluster.go @@ -46,14 +46,6 @@ func resourceAwsElasticacheCluster() *schema.Resource { Computed: true, ForceNew: true, }, - "availability_zones": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - Removed: "Use `preferred_availability_zones` argument instead", - }, "az_mode": { Type: schema.TypeString, Optional: true, diff --git a/aws/resource_aws_instance.go b/aws/resource_aws_instance.go index abb2739a4f1..ecec68df3bf 100644 --- a/aws/resource_aws_instance.go +++ b/aws/resource_aws_instance.go @@ -194,12 +194,6 @@ func resourceAwsInstance() *schema.Resource { Computed: true, }, - "network_interface_id": { - Type: schema.TypeString, - Computed: true, - Removed: "Use `primary_network_interface_id` attribute instead", - }, - "primary_network_interface_id": { Type: schema.TypeString, Computed: true, diff --git a/aws/resource_aws_network_acl.go b/aws/resource_aws_network_acl.go index 0c92d0e9825..d3b0b08d5f5 100644 --- a/aws/resource_aws_network_acl.go +++ b/aws/resource_aws_network_acl.go @@ -39,12 +39,6 @@ func resourceAwsNetworkAcl() *schema.Resource { Required: true, ForceNew: true, }, - "subnet_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Removed: "Use `subnet_ids` argument instead", - }, "subnet_ids": { Type: schema.TypeSet, Optional: true, diff --git a/aws/resource_aws_redshift_cluster.go b/aws/resource_aws_redshift_cluster.go index d1284ea31d6..0bf8f5797b7 100644 --- a/aws/resource_aws_redshift_cluster.go +++ b/aws/resource_aws_redshift_cluster.go @@ -303,27 +303,6 @@ func resourceAwsRedshiftCluster() *schema.Resource { }, }, - "enable_logging": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - Removed: "Use `logging` configuration block `enable` argument instead", - }, - - "bucket_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - Removed: "Use `logging` configuration block `bucket_name` argument instead", - }, - - "s3_key_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - Removed: "Use `logging` configuration block `s3_key_prefix` argument instead", - }, - "snapshot_identifier": { Type: schema.TypeString, Optional: true, diff --git a/aws/resource_aws_route53_zone.go b/aws/resource_aws_route53_zone.go index e12c609f489..f156814317f 100644 --- a/aws/resource_aws_route53_zone.go +++ b/aws/resource_aws_route53_zone.go @@ -63,22 +63,6 @@ func resourceAwsRoute53Zone() *schema.Resource { Set: route53HostedZoneVPCHash, }, - "vpc_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - Removed: "use 'vpc' configuration block instead", - }, - - "vpc_region": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - Removed: "use 'vpc' configuration block instead", - }, - "zone_id": { Type: schema.TypeString, Computed: true, diff --git a/aws/resource_aws_wafregional_byte_match_set.go b/aws/resource_aws_wafregional_byte_match_set.go index 399bec8401f..3a9a217a90f 100644 --- a/aws/resource_aws_wafregional_byte_match_set.go +++ b/aws/resource_aws_wafregional_byte_match_set.go @@ -26,44 +26,6 @@ func resourceAwsWafRegionalByteMatchSet() *schema.Resource { Required: true, ForceNew: true, }, - "byte_match_tuple": { - Type: schema.TypeSet, - Optional: true, - Removed: "use `byte_match_tuples` configuration block(s) instead", - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "field_to_match": { - Type: schema.TypeList, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "data": { - Type: schema.TypeString, - Optional: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "positional_constraint": { - Type: schema.TypeString, - Required: true, - }, - "target_string": { - Type: schema.TypeString, - Optional: true, - }, - "text_transformation": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, "byte_match_tuples": { Type: schema.TypeSet, Optional: true, diff --git a/aws/structure.go b/aws/structure.go index 37811e38d85..b3870b868c5 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -1819,58 +1819,6 @@ func expandApiGatewayRequestResponseModelOperations(d *schema.ResourceData, key return operations } -func deprecatedExpandApiGatewayMethodParametersJSONOperations(d *schema.ResourceData, key string, prefix string) ([]*apigateway.PatchOperation, error) { - operations := make([]*apigateway.PatchOperation, 0) - oldParameters, newParameters := d.GetChange(key) - oldParametersMap := make(map[string]interface{}) - newParametersMap := make(map[string]interface{}) - - if err := json.Unmarshal([]byte(oldParameters.(string)), &oldParametersMap); err != nil { - err := fmt.Errorf("Error unmarshaling old %s: %s", key, err) - return operations, err - } - - if err := json.Unmarshal([]byte(newParameters.(string)), &newParametersMap); err != nil { - err := fmt.Errorf("Error unmarshaling new %s: %s", key, err) - return operations, err - } - - for k := range oldParametersMap { - operation := apigateway.PatchOperation{ - Op: aws.String("remove"), - Path: aws.String(fmt.Sprintf("/%s/%s", prefix, k)), - } - - for nK, nV := range newParametersMap { - if nK == k { - operation.Op = aws.String("replace") - operation.Value = aws.String(strconv.FormatBool(nV.(bool))) - } - } - - operations = append(operations, &operation) - } - - for nK, nV := range newParametersMap { - exists := false - for k := range oldParametersMap { - if k == nK { - exists = true - } - } - if !exists { - operation := apigateway.PatchOperation{ - Op: aws.String("add"), - Path: aws.String(fmt.Sprintf("/%s/%s", prefix, nK)), - Value: aws.String(strconv.FormatBool(nV.(bool))), - } - operations = append(operations, &operation) - } - } - - return operations, nil -} - func expandApiGatewayMethodParametersOperations(d *schema.ResourceData, key string, prefix string) []*apigateway.PatchOperation { operations := make([]*apigateway.PatchOperation, 0)