// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package iot 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_iot_dimension", dimensionDataSourceType) } // dimensionDataSourceType returns the Terraform awscc_iot_dimension data source type. // This Terraform data source type corresponds to the CloudFormation AWS::IoT::Dimension resource type. func dimensionDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "arn": { // Property: Arn // CloudFormation resource type schema: // { // "description": "The ARN (Amazon resource name) of the created dimension.", // "type": "string" // } Description: "The ARN (Amazon resource name) of the created dimension.", Type: types.StringType, Computed: true, }, "name": { // Property: Name // CloudFormation resource type schema: // { // "description": "A unique identifier for the dimension.", // "maxLength": 128, // "minLength": 1, // "pattern": "[a-zA-Z0-9:_-]+", // "type": "string" // } Description: "A unique identifier for the dimension.", Type: types.StringType, Computed: true, }, "string_values": { // Property: StringValues // CloudFormation resource type schema: // { // "description": "Specifies the value or list of values for the dimension.", // "insertionOrder": false, // "items": { // "maxLength": 256, // "minLength": 1, // "type": "string" // }, // "maxItems": 5, // "minItems": 1, // "type": "array", // "uniqueItems": true // } Description: "Specifies the value or list of values for the dimension.", Type: types.SetType{ElemType: types.StringType}, Computed: true, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "description": "Metadata that can be used to manage the dimension.", // "insertionOrder": false, // "items": { // "additionalProperties": false, // "description": "A key-value pair to associate with a resource.", // "properties": { // "Key": { // "description": "The tag's key.", // "maxLength": 128, // "minLength": 1, // "type": "string" // }, // "Value": { // "description": "The tag's value.", // "maxLength": 256, // "minLength": 1, // "type": "string" // } // }, // "required": [ // "Value", // "Key" // ], // "type": "object" // }, // "maxItems": 50, // "type": "array", // "uniqueItems": true // } Description: "Metadata that can be used to manage the dimension.", Attributes: tfsdk.SetNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Description: "The tag's key.", Type: types.StringType, Computed: true, }, "value": { // Property: Value Description: "The tag's value.", Type: types.StringType, Computed: true, }, }, tfsdk.SetNestedAttributesOptions{}, ), Computed: true, }, "type": { // Property: Type // CloudFormation resource type schema: // { // "description": "Specifies the type of the dimension.", // "enum": [ // "TOPIC_FILTER" // ], // "type": "string" // } Description: "Specifies the type of the dimension.", 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::IoT::Dimension", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::IoT::Dimension").WithTerraformTypeName("awscc_iot_dimension") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "key": "Key", "name": "Name", "string_values": "StringValues", "tags": "Tags", "type": "Type", "value": "Value", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }