// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package xray 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_xray_group", groupDataSourceType) } // groupDataSourceType returns the Terraform awscc_xray_group data source type. // This Terraform data source type corresponds to the CloudFormation AWS::XRay::Group resource type. func groupDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "filter_expression": { // Property: FilterExpression // CloudFormation resource type schema: // { // "description": "The filter expression defining criteria by which to group traces.", // "type": "string" // } Description: "The filter expression defining criteria by which to group traces.", Type: types.StringType, Computed: true, }, "group_arn": { // Property: GroupARN // CloudFormation resource type schema: // { // "description": "The ARN of the group that was generated on creation.", // "maxLength": 400, // "minLength": 1, // "type": "string" // } Description: "The ARN of the group that was generated on creation.", Type: types.StringType, Computed: true, }, "group_name": { // Property: GroupName // CloudFormation resource type schema: // { // "description": "The case-sensitive name of the new group. Names must be unique.", // "maxLength": 32, // "minLength": 1, // "type": "string" // } Description: "The case-sensitive name of the new group. Names must be unique.", Type: types.StringType, Computed: true, }, "insights_configuration": { // Property: InsightsConfiguration // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "InsightsEnabled": { // "description": "Set the InsightsEnabled value to true to enable insights or false to disable insights.", // "type": "boolean" // }, // "NotificationsEnabled": { // "description": "Set the NotificationsEnabled value to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.", // "type": "boolean" // } // }, // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "insights_enabled": { // Property: InsightsEnabled Description: "Set the InsightsEnabled value to true to enable insights or false to disable insights.", Type: types.BoolType, Computed: true, }, "notifications_enabled": { // Property: NotificationsEnabled Description: "Set the NotificationsEnabled value to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.", Type: types.BoolType, Computed: true, }, }, ), Computed: true, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "items": { // "additionalProperties": false, // "properties": { // "Key": { // "type": "string" // }, // "Value": { // "type": "string" // } // }, // "required": [ // "Key", // "Value" // ], // "type": "object" // }, // "type": "array" // } 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::XRay::Group", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::XRay::Group").WithTerraformTypeName("awscc_xray_group") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "filter_expression": "FilterExpression", "group_arn": "GroupARN", "group_name": "GroupName", "insights_configuration": "InsightsConfiguration", "insights_enabled": "InsightsEnabled", "key": "Key", "notifications_enabled": "NotificationsEnabled", "tags": "Tags", "value": "Value", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }