// 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_named_query", namedQueryResourceType) } // namedQueryResourceType returns the Terraform awscc_athena_named_query resource type. // This Terraform resource type corresponds to the CloudFormation AWS::Athena::NamedQuery resource type. func namedQueryResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "database": { // Property: Database // CloudFormation resource type schema: // { // "description": "The database to which the query belongs.", // "maxLength": 255, // "minLength": 1, // "type": "string" // } Description: "The database to which the query belongs.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 255), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "description": { // Property: Description // CloudFormation resource type schema: // { // "description": "The query description.", // "maxLength": 1024, // "minLength": 1, // "type": "string" // } Description: "The query description.", Type: types.StringType, Optional: true, Computed: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 1024), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "name": { // Property: Name // CloudFormation resource type schema: // { // "description": "The query name.", // "maxLength": 128, // "minLength": 1, // "type": "string" // } Description: "The query name.", Type: types.StringType, Optional: true, Computed: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 128), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "named_query_id": { // Property: NamedQueryId // CloudFormation resource type schema: // { // "description": "The unique ID of the query.", // "type": "string" // } Description: "The unique ID of the query.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "query_string": { // Property: QueryString // CloudFormation resource type schema: // { // "description": "The contents of the query with all query statements.", // "maxLength": 262144, // "minLength": 1, // "type": "string" // } Description: "The contents of the query with all query statements.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 262144), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "work_group": { // Property: WorkGroup // CloudFormation resource type schema: // { // "description": "The name of the workgroup that contains the named query.", // "maxLength": 128, // "minLength": 1, // "type": "string" // } Description: "The name of the workgroup that contains the named query.", Type: types.StringType, Optional: true, Computed: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 128), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), 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::NamedQuery", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::Athena::NamedQuery").WithTerraformTypeName("awscc_athena_named_query") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "database": "Database", "description": "Description", "name": "Name", "named_query_id": "NamedQueryId", "query_string": "QueryString", "work_group": "WorkGroup", }) opts = opts.IsImmutableType(true) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }