// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package glue 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_glue_schema_version", schemaVersionDataSourceType) } // schemaVersionDataSourceType returns the Terraform awscc_glue_schema_version data source type. // This Terraform data source type corresponds to the CloudFormation AWS::Glue::SchemaVersion resource type. func schemaVersionDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "schema": { // Property: Schema // CloudFormation resource type schema: // { // "additionalProperties": false, // "description": "Identifier for the schema where the schema version will be created.", // "properties": { // "RegistryName": { // "description": "Name of the registry to identify where the Schema is located.", // "maxLength": 255, // "minLength": 1, // "type": "string" // }, // "SchemaArn": { // "description": "Amazon Resource Name for the Schema. This attribute can be used to uniquely represent the Schema.", // "pattern": "arn:(aws|aws-us-gov|aws-cn):glue:.*", // "type": "string" // }, // "SchemaName": { // "description": "Name of the schema. This parameter requires RegistryName to be provided.", // "maxLength": 255, // "minLength": 1, // "type": "string" // } // }, // "type": "object" // } Description: "Identifier for the schema where the schema version will be created.", Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "registry_name": { // Property: RegistryName Description: "Name of the registry to identify where the Schema is located.", Type: types.StringType, Computed: true, }, "schema_arn": { // Property: SchemaArn Description: "Amazon Resource Name for the Schema. This attribute can be used to uniquely represent the Schema.", Type: types.StringType, Computed: true, }, "schema_name": { // Property: SchemaName Description: "Name of the schema. This parameter requires RegistryName to be provided.", Type: types.StringType, Computed: true, }, }, ), Computed: true, }, "schema_definition": { // Property: SchemaDefinition // CloudFormation resource type schema: // { // "description": "Complete definition of the schema in plain-text.", // "maxLength": 170000, // "minLength": 1, // "type": "string" // } Description: "Complete definition of the schema in plain-text.", Type: types.StringType, Computed: true, }, "version_id": { // Property: VersionId // CloudFormation resource type schema: // { // "description": "Represents the version ID associated with the schema version.", // "pattern": "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}", // "type": "string" // } Description: "Represents the version ID associated with the schema version.", 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::Glue::SchemaVersion", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::Glue::SchemaVersion").WithTerraformTypeName("awscc_glue_schema_version") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "registry_name": "RegistryName", "schema": "Schema", "schema_arn": "SchemaArn", "schema_definition": "SchemaDefinition", "schema_name": "SchemaName", "version_id": "VersionId", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }