// Code generated by generators/resource/main.go; DO NOT EDIT. package athena 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" "github.com/hashicorp/terraform-provider-awscc/internal/validate" ) func init() { registry.AddResourceTypeFactory("awscc_athena_prepared_statement", preparedStatementResourceType) } // preparedStatementResourceType returns the Terraform awscc_athena_prepared_statement resource type. // This Terraform resource type corresponds to the CloudFormation AWS::Athena::PreparedStatement resource type. func preparedStatementResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "description": { // Property: Description // CloudFormation resource type schema: // { // "description": "The description of the prepared statement.", // "maxLength": 1024, // "minLength": 1, // "type": "string" // } Description: "The description of the prepared statement.", Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 1024), }, }, "query_statement": { // Property: QueryStatement // CloudFormation resource type schema: // { // "description": "The query string for the prepared statement.", // "maxLength": 262144, // "minLength": 1, // "type": "string" // } Description: "The query string for the prepared statement.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 262144), }, }, "statement_name": { // Property: StatementName // CloudFormation resource type schema: // { // "description": "The name of the prepared statement.", // "maxLength": 256, // "minLength": 1, // "type": "string" // } Description: "The name of the prepared statement.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 256), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "work_group": { // Property: WorkGroup // CloudFormation resource type schema: // { // "description": "The name of the workgroup to which the prepared statement belongs.", // "maxLength": 128, // "minLength": 1, // "type": "string" // } Description: "The name of the workgroup to which the prepared statement belongs.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 128), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, } schema := tfsdk.Schema{ Description: "Resource schema for AWS::Athena::PreparedStatement", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::Athena::PreparedStatement").WithTerraformTypeName("awscc_athena_prepared_statement") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "query_statement": "QueryStatement", "statement_name": "StatementName", "work_group": "WorkGroup", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }