// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package workspaces 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_workspaces_connection_alias", connectionAliasDataSourceType) } // connectionAliasDataSourceType returns the Terraform awscc_workspaces_connection_alias data source type. // This Terraform data source type corresponds to the CloudFormation AWS::WorkSpaces::ConnectionAlias resource type. func connectionAliasDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "alias_id": { // Property: AliasId // CloudFormation resource type schema: // { // "maxLength": 68, // "minLength": 13, // "pattern": "^wsca-[0-9a-z]{8,63}$", // "type": "string" // } Type: types.StringType, Computed: true, }, "associations": { // Property: Associations // CloudFormation resource type schema: // { // "items": { // "additionalProperties": false, // "properties": { // "AssociatedAccountId": { // "type": "string" // }, // "AssociationStatus": { // "enum": [ // "NOT_ASSOCIATED", // "PENDING_ASSOCIATION", // "ASSOCIATED_WITH_OWNER_ACCOUNT", // "ASSOCIATED_WITH_SHARED_ACCOUNT", // "PENDING_DISASSOCIATION" // ], // "type": "string" // }, // "ConnectionIdentifier": { // "maxLength": 20, // "minLength": 1, // "pattern": "^[a-zA-Z0-9]+$", // "type": "string" // }, // "ResourceId": { // "maxLength": 1000, // "minLength": 1, // "pattern": ".+", // "type": "string" // } // }, // "type": "object" // }, // "maxLength": 25, // "minLength": 1, // "type": "array" // } Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "associated_account_id": { // Property: AssociatedAccountId Type: types.StringType, Computed: true, }, "association_status": { // Property: AssociationStatus Type: types.StringType, Computed: true, }, "connection_identifier": { // Property: ConnectionIdentifier Type: types.StringType, Computed: true, }, "resource_id": { // Property: ResourceId Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, "connection_alias_state": { // Property: ConnectionAliasState // CloudFormation resource type schema: // { // "enum": [ // "CREATING", // "CREATED", // "DELETING" // ], // "type": "string" // } Type: types.StringType, Computed: true, }, "connection_string": { // Property: ConnectionString // CloudFormation resource type schema: // { // "maxLength": 255, // "minLength": 1, // "pattern": "^[.0-9a-zA-Z\\-]{1,255}$", // "type": "string" // } Type: types.StringType, Computed: true, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "items": { // "additionalProperties": false, // "properties": { // "Key": { // "type": "string" // }, // "Value": { // "type": "string" // } // }, // "required": [ // "Value", // "Key" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": false // } Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Type: types.StringType, Computed: true, }, "value": { // Property: Value Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), 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::WorkSpaces::ConnectionAlias", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::WorkSpaces::ConnectionAlias").WithTerraformTypeName("awscc_workspaces_connection_alias") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "alias_id": "AliasId", "associated_account_id": "AssociatedAccountId", "association_status": "AssociationStatus", "associations": "Associations", "connection_alias_state": "ConnectionAliasState", "connection_identifier": "ConnectionIdentifier", "connection_string": "ConnectionString", "key": "Key", "resource_id": "ResourceId", "tags": "Tags", "value": "Value", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }