// Code generated by generators/resource/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.AddResourceTypeFactory("awscc_apigateway_request_validator", requestValidatorResourceType) } // requestValidatorResourceType returns the Terraform awscc_apigateway_request_validator resource type. // This Terraform resource type corresponds to the CloudFormation AWS::ApiGateway::RequestValidator resource type. func requestValidatorResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "name": { // Property: Name // CloudFormation resource type schema: // { // "description": "Name of the request validator.", // "type": "string" // } Description: "Name of the request validator.", Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "request_validator_id": { // Property: RequestValidatorId // CloudFormation resource type schema: // { // "description": "ID of the request validator.", // "type": "string" // } Description: "ID of the request validator.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "rest_api_id": { // Property: RestApiId // CloudFormation resource type schema: // { // "description": "The identifier of the targeted API entity.", // "type": "string" // } Description: "The identifier of the targeted API entity.", Type: types.StringType, Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "validate_request_body": { // Property: ValidateRequestBody // CloudFormation resource type schema: // { // "description": "Indicates whether to validate the request body according to the configured schema for the targeted API and method. ", // "type": "boolean" // } Description: "Indicates whether to validate the request body according to the configured schema for the targeted API and method. ", Type: types.BoolType, Optional: true, }, "validate_request_parameters": { // Property: ValidateRequestParameters // CloudFormation resource type schema: // { // "description": "Indicates whether to validate request parameters.", // "type": "boolean" // } Description: "Indicates whether to validate request parameters.", Type: types.BoolType, Optional: true, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, } schema := tfsdk.Schema{ Description: "Resource Type definition for AWS::ApiGateway::RequestValidator", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::RequestValidator").WithTerraformTypeName("awscc_apigateway_request_validator") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "name": "Name", "request_validator_id": "RequestValidatorId", "rest_api_id": "RestApiId", "validate_request_body": "ValidateRequestBody", "validate_request_parameters": "ValidateRequestParameters", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }