// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package apigateway import ( "context" "github.com/hashicorp/terraform-plugin-framework/tfsdk" "github.com/hashicorp/terraform-plugin-framework/types" . "github.com/hashicorp/terraform-provider-awscc/internal/generic" "github.com/hashicorp/terraform-provider-awscc/internal/registry" ) func init() { registry.AddDataSourceTypeFactory("awscc_apigateway_deployment", deploymentDataSourceType) } // deploymentDataSourceType returns the Terraform awscc_apigateway_deployment data source type. // This Terraform data source type corresponds to the CloudFormation AWS::ApiGateway::Deployment resource type. func deploymentDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "deployment_canary_settings": { // Property: DeploymentCanarySettings // CloudFormation resource type schema: // { // "additionalProperties": false, // "description": "Specifies settings for the canary deployment.", // "properties": { // "PercentTraffic": { // "description": "The percentage (0-100) of traffic diverted to a canary deployment.", // "type": "number" // }, // "StageVariableOverrides": { // "additionalProperties": false, // "description": "Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary. These stage variables are represented as a string-to-string map between stage variable names and their values. Duplicates are not allowed.", // "patternProperties": { // "": { // "type": "string" // } // }, // "type": "object" // }, // "UseStageCache": { // "description": "Whether the canary deployment uses the stage cache.", // "type": "boolean" // } // }, // "type": "object" // } Description: "Specifies settings for the canary deployment.", Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "percent_traffic": { // Property: PercentTraffic Description: "The percentage (0-100) of traffic diverted to a canary deployment.", Type: types.Float64Type, Computed: true, }, "stage_variable_overrides": { // Property: StageVariableOverrides Description: "Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary. These stage variables are represented as a string-to-string map between stage variable names and their values. Duplicates are not allowed.", // Pattern: "" Type: types.MapType{ElemType: types.StringType}, Computed: true, }, "use_stage_cache": { // Property: UseStageCache Description: "Whether the canary deployment uses the stage cache.", Type: types.BoolType, Computed: true, }, }, ), Computed: true, }, "deployment_id": { // Property: DeploymentId // CloudFormation resource type schema: // { // "description": "Primary Id for this resource", // "type": "string" // } Description: "Primary Id for this resource", Type: types.StringType, Computed: true, }, "description": { // Property: Description // CloudFormation resource type schema: // { // "description": "A description of the purpose of the API Gateway deployment.", // "type": "string" // } Description: "A description of the purpose of the API Gateway deployment.", Type: types.StringType, Computed: true, }, "rest_api_id": { // Property: RestApiId // CloudFormation resource type schema: // { // "description": "The ID of the RestApi resource to deploy. ", // "type": "string" // } Description: "The ID of the RestApi resource to deploy. ", Type: types.StringType, Computed: true, }, "stage_description": { // Property: StageDescription // CloudFormation resource type schema: // { // "additionalProperties": false, // "description": "Configures the stage that API Gateway creates with this deployment.", // "properties": { // "AccessLogSetting": { // "additionalProperties": false, // "description": "Specifies settings for logging access in this stage.", // "properties": { // "DestinationArn": { // "description": "The Amazon Resource Name (ARN) of the CloudWatch Logs log group or Kinesis Data Firehose delivery stream to receive access logs. If you specify a Kinesis Data Firehose delivery stream, the stream name must begin with amazon-apigateway-. ", // "type": "string" // }, // "Format": { // "description": "A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId. ", // "type": "string" // } // }, // "type": "object" // }, // "CacheClusterEnabled": { // "description": "Indicates whether cache clustering is enabled for the stage.", // "type": "boolean" // }, // "CacheClusterSize": { // "description": "The size of the stage's cache cluster.", // "type": "string" // }, // "CacheDataEncrypted": { // "description": "The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches responses. ", // "type": "boolean" // }, // "CacheTtlInSeconds": { // "description": "The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches responses. ", // "type": "integer" // }, // "CachingEnabled": { // "description": "Indicates whether responses are cached and returned for requests. You must enable a cache cluster on the stage to cache responses.", // "type": "boolean" // }, // "CanarySetting": { // "additionalProperties": false, // "description": "Specifies settings for the canary deployment in this stage.", // "properties": { // "PercentTraffic": { // "description": "The percent (0-100) of traffic diverted to a canary deployment.", // "type": "number" // }, // "StageVariableOverrides": { // "additionalProperties": false, // "description": "Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary. These stage variables are represented as a string-to-string map between stage variable names and their values. ", // "patternProperties": { // "": { // "type": "string" // } // }, // "type": "object" // }, // "UseStageCache": { // "description": "Whether the canary deployment uses the stage cache or not.", // "type": "boolean" // } // }, // "type": "object" // }, // "ClientCertificateId": { // "description": "The identifier of the client certificate that API Gateway uses to call your integration endpoints in the stage. ", // "type": "string" // }, // "DataTraceEnabled": { // "description": "Indicates whether data trace logging is enabled for methods in the stage. API Gateway pushes these logs to Amazon CloudWatch Logs. ", // "type": "boolean" // }, // "Description": { // "description": "A description of the purpose of the stage.", // "type": "string" // }, // "DocumentationVersion": { // "description": "The version identifier of the API documentation snapshot.", // "type": "string" // }, // "LoggingLevel": { // "description": "The logging level for this method. For valid values, see the loggingLevel property of the Stage resource in the Amazon API Gateway API Reference. ", // "type": "string" // }, // "MethodSettings": { // "description": "Configures settings for all of the stage's methods.", // "insertionOrder": false, // "items": { // "additionalProperties": false, // "properties": { // "CacheDataEncrypted": { // "description": "Indicates whether the cached responses are encrypted", // "type": "boolean" // }, // "CacheTtlInSeconds": { // "description": "The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches responses. ", // "type": "integer" // }, // "CachingEnabled": { // "description": "Indicates whether responses are cached and returned for requests. You must enable a cache cluster on the stage to cache responses.", // "type": "boolean" // }, // "DataTraceEnabled": { // "description": "Indicates whether data trace logging is enabled for methods in the stage. API Gateway pushes these logs to Amazon CloudWatch Logs. ", // "type": "boolean" // }, // "HttpMethod": { // "description": "The HTTP method.", // "type": "string" // }, // "LoggingLevel": { // "description": "The logging level for this method. For valid values, see the loggingLevel property of the Stage resource in the Amazon API Gateway API Reference. ", // "type": "string" // }, // "MetricsEnabled": { // "description": "Indicates whether Amazon CloudWatch metrics are enabled for methods in the stage.", // "type": "boolean" // }, // "ResourcePath": { // "description": "The resource path for this method. Forward slashes (/) are encoded as ~1 and the initial slash must include a forward slash. ", // "type": "string" // }, // "ThrottlingBurstLimit": { // "description": "The number of burst requests per second that API Gateway permits across all APIs, stages, and methods in your AWS account.", // "type": "integer" // }, // "ThrottlingRateLimit": { // "description": "The number of steady-state requests per second that API Gateway permits across all APIs, stages, and methods in your AWS account.", // "type": "number" // } // }, // "type": "object" // }, // "type": "array", // "uniqueItems": true // }, // "MetricsEnabled": { // "description": "Indicates whether Amazon CloudWatch metrics are enabled for methods in the stage.", // "type": "boolean" // }, // "Tags": { // "description": "An array of arbitrary tags (key-value pairs) to associate with the stage.", // "insertionOrder": false, // "items": { // "additionalProperties": false, // "properties": { // "Key": { // "description": "The key name of the tag", // "type": "string" // }, // "Value": { // "description": "The value for the tag", // "type": "string" // } // }, // "required": [ // "Value", // "Key" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": false // }, // "ThrottlingBurstLimit": { // "description": "The number of burst requests per second that API Gateway permits across all APIs, stages, and methods in your AWS account.", // "type": "integer" // }, // "ThrottlingRateLimit": { // "description": "The number of steady-state requests per second that API Gateway permits across all APIs, stages, and methods in your AWS account.", // "type": "number" // }, // "TracingEnabled": { // "description": "Specifies whether active tracing with X-ray is enabled for this stage.", // "type": "boolean" // }, // "Variables": { // "additionalProperties": false, // "description": "A map that defines the stage variables. Variable names must consist of alphanumeric characters, and the values must match the following regular expression: [A-Za-z0-9-._~:/?#\u0026=,]+. ", // "patternProperties": { // "": { // "type": "string" // } // }, // "type": "object" // } // }, // "type": "object" // } Description: "Configures the stage that API Gateway creates with this deployment.", Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "access_log_setting": { // Property: AccessLogSetting Description: "Specifies settings for logging access in this stage.", Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "destination_arn": { // Property: DestinationArn Description: "The Amazon Resource Name (ARN) of the CloudWatch Logs log group or Kinesis Data Firehose delivery stream to receive access logs. If you specify a Kinesis Data Firehose delivery stream, the stream name must begin with amazon-apigateway-. ", Type: types.StringType, Computed: true, }, "format": { // Property: Format Description: "A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId. ", Type: types.StringType, Computed: true, }, }, ), Computed: true, }, "cache_cluster_enabled": { // Property: CacheClusterEnabled Description: "Indicates whether cache clustering is enabled for the stage.", Type: types.BoolType, Computed: true, }, "cache_cluster_size": { // Property: CacheClusterSize Description: "The size of the stage's cache cluster.", Type: types.StringType, Computed: true, }, "cache_data_encrypted": { // Property: CacheDataEncrypted Description: "The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches responses. ", Type: types.BoolType, Computed: true, }, "cache_ttl_in_seconds": { // Property: CacheTtlInSeconds Description: "The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches responses. ", Type: types.Int64Type, Computed: true, }, "caching_enabled": { // Property: CachingEnabled Description: "Indicates whether responses are cached and returned for requests. You must enable a cache cluster on the stage to cache responses.", Type: types.BoolType, Computed: true, }, "canary_setting": { // Property: CanarySetting Description: "Specifies settings for the canary deployment in this stage.", Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "percent_traffic": { // Property: PercentTraffic Description: "The percent (0-100) of traffic diverted to a canary deployment.", Type: types.Float64Type, Computed: true, }, "stage_variable_overrides": { // Property: StageVariableOverrides Description: "Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary. These stage variables are represented as a string-to-string map between stage variable names and their values. ", // Pattern: "" Type: types.MapType{ElemType: types.StringType}, Computed: true, }, "use_stage_cache": { // Property: UseStageCache Description: "Whether the canary deployment uses the stage cache or not.", Type: types.BoolType, Computed: true, }, }, ), Computed: true, }, "client_certificate_id": { // Property: ClientCertificateId Description: "The identifier of the client certificate that API Gateway uses to call your integration endpoints in the stage. ", Type: types.StringType, Computed: true, }, "data_trace_enabled": { // Property: DataTraceEnabled Description: "Indicates whether data trace logging is enabled for methods in the stage. API Gateway pushes these logs to Amazon CloudWatch Logs. ", Type: types.BoolType, Computed: true, }, "description": { // Property: Description Description: "A description of the purpose of the stage.", Type: types.StringType, Computed: true, }, "documentation_version": { // Property: DocumentationVersion Description: "The version identifier of the API documentation snapshot.", Type: types.StringType, Computed: true, }, "logging_level": { // Property: LoggingLevel Description: "The logging level for this method. For valid values, see the loggingLevel property of the Stage resource in the Amazon API Gateway API Reference. ", Type: types.StringType, Computed: true, }, "method_settings": { // Property: MethodSettings Description: "Configures settings for all of the stage's methods.", Attributes: tfsdk.SetNestedAttributes( map[string]tfsdk.Attribute{ "cache_data_encrypted": { // Property: CacheDataEncrypted Description: "Indicates whether the cached responses are encrypted", Type: types.BoolType, Computed: true, }, "cache_ttl_in_seconds": { // Property: CacheTtlInSeconds Description: "The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches responses. ", Type: types.Int64Type, Computed: true, }, "caching_enabled": { // Property: CachingEnabled Description: "Indicates whether responses are cached and returned for requests. You must enable a cache cluster on the stage to cache responses.", Type: types.BoolType, Computed: true, }, "data_trace_enabled": { // Property: DataTraceEnabled Description: "Indicates whether data trace logging is enabled for methods in the stage. API Gateway pushes these logs to Amazon CloudWatch Logs. ", Type: types.BoolType, Computed: true, }, "http_method": { // Property: HttpMethod Description: "The HTTP method.", Type: types.StringType, Computed: true, }, "logging_level": { // Property: LoggingLevel Description: "The logging level for this method. For valid values, see the loggingLevel property of the Stage resource in the Amazon API Gateway API Reference. ", Type: types.StringType, Computed: true, }, "metrics_enabled": { // Property: MetricsEnabled Description: "Indicates whether Amazon CloudWatch metrics are enabled for methods in the stage.", Type: types.BoolType, Computed: true, }, "resource_path": { // Property: ResourcePath Description: "The resource path for this method. Forward slashes (/) are encoded as ~1 and the initial slash must include a forward slash. ", Type: types.StringType, Computed: true, }, "throttling_burst_limit": { // Property: ThrottlingBurstLimit Description: "The number of burst requests per second that API Gateway permits across all APIs, stages, and methods in your AWS account.", Type: types.Int64Type, Computed: true, }, "throttling_rate_limit": { // Property: ThrottlingRateLimit Description: "The number of steady-state requests per second that API Gateway permits across all APIs, stages, and methods in your AWS account.", Type: types.Float64Type, Computed: true, }, }, tfsdk.SetNestedAttributesOptions{}, ), Computed: true, }, "metrics_enabled": { // Property: MetricsEnabled Description: "Indicates whether Amazon CloudWatch metrics are enabled for methods in the stage.", Type: types.BoolType, Computed: true, }, "tags": { // Property: Tags Description: "An array of arbitrary tags (key-value pairs) to associate with the stage.", Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Description: "The key name of the tag", Type: types.StringType, Computed: true, }, "value": { // Property: Value Description: "The value for the tag", Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, "throttling_burst_limit": { // Property: ThrottlingBurstLimit Description: "The number of burst requests per second that API Gateway permits across all APIs, stages, and methods in your AWS account.", Type: types.Int64Type, Computed: true, }, "throttling_rate_limit": { // Property: ThrottlingRateLimit Description: "The number of steady-state requests per second that API Gateway permits across all APIs, stages, and methods in your AWS account.", Type: types.Float64Type, Computed: true, }, "tracing_enabled": { // Property: TracingEnabled Description: "Specifies whether active tracing with X-ray is enabled for this stage.", Type: types.BoolType, Computed: true, }, "variables": { // Property: Variables Description: "A map that defines the stage variables. Variable names must consist of alphanumeric characters, and the values must match the following regular expression: [A-Za-z0-9-._~:/?#&=,]+. ", // Pattern: "" Type: types.MapType{ElemType: types.StringType}, Computed: true, }, }, ), Computed: true, }, "stage_name": { // Property: StageName // CloudFormation resource type schema: // { // "description": "A name for the stage that API Gateway creates with this deployment. Use only alphanumeric characters.", // "type": "string" // } Description: "A name for the stage that API Gateway creates with this deployment. Use only alphanumeric characters.", Type: types.StringType, Computed: true, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Required: true, } schema := tfsdk.Schema{ Description: "Data Source schema for AWS::ApiGateway::Deployment", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::Deployment").WithTerraformTypeName("awscc_apigateway_deployment") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "access_log_setting": "AccessLogSetting", "cache_cluster_enabled": "CacheClusterEnabled", "cache_cluster_size": "CacheClusterSize", "cache_data_encrypted": "CacheDataEncrypted", "cache_ttl_in_seconds": "CacheTtlInSeconds", "caching_enabled": "CachingEnabled", "canary_setting": "CanarySetting", "client_certificate_id": "ClientCertificateId", "data_trace_enabled": "DataTraceEnabled", "deployment_canary_settings": "DeploymentCanarySettings", "deployment_id": "DeploymentId", "description": "Description", "destination_arn": "DestinationArn", "documentation_version": "DocumentationVersion", "format": "Format", "http_method": "HttpMethod", "key": "Key", "logging_level": "LoggingLevel", "method_settings": "MethodSettings", "metrics_enabled": "MetricsEnabled", "percent_traffic": "PercentTraffic", "resource_path": "ResourcePath", "rest_api_id": "RestApiId", "stage_description": "StageDescription", "stage_name": "StageName", "stage_variable_overrides": "StageVariableOverrides", "tags": "Tags", "throttling_burst_limit": "ThrottlingBurstLimit", "throttling_rate_limit": "ThrottlingRateLimit", "tracing_enabled": "TracingEnabled", "use_stage_cache": "UseStageCache", "value": "Value", "variables": "Variables", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }