// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package gamelift 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_gamelift_alias", aliasDataSourceType) } // aliasDataSourceType returns the Terraform awscc_gamelift_alias data source type. // This Terraform data source type corresponds to the CloudFormation AWS::GameLift::Alias resource type. func aliasDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "alias_id": { // Property: AliasId // CloudFormation resource type schema: // { // "description": "Unique alias ID", // "type": "string" // } Description: "Unique alias ID", Type: types.StringType, Computed: true, }, "description": { // Property: Description // CloudFormation resource type schema: // { // "description": "A human-readable description of the alias.", // "maxLength": 1024, // "minLength": 1, // "type": "string" // } Description: "A human-readable description of the alias.", Type: types.StringType, Computed: true, }, "name": { // Property: Name // CloudFormation resource type schema: // { // "description": "A descriptive label that is associated with an alias. Alias names do not need to be unique.", // "maxLength": 1024, // "minLength": 1, // "pattern": ".*\\S.*", // "type": "string" // } Description: "A descriptive label that is associated with an alias. Alias names do not need to be unique.", Type: types.StringType, Computed: true, }, "routing_strategy": { // Property: RoutingStrategy // CloudFormation resource type schema: // { // "additionalProperties": false, // "anyOf": [ // { // "required": [ // "FleetId" // ] // }, // { // "required": [ // "Message" // ] // } // ], // "description": "A routing configuration that specifies where traffic is directed for this alias, such as to a fleet or to a message.", // "properties": { // "FleetId": { // "description": "A unique identifier for a fleet that the alias points to. If you specify SIMPLE for the Type property, you must specify this property.", // "pattern": "^fleet-\\S+", // "type": "string" // }, // "Message": { // "description": "The message text to be used with a terminal routing strategy. If you specify TERMINAL for the Type property, you must specify this property.", // "type": "string" // }, // "Type": { // "description": "Simple routing strategy. The alias resolves to one specific fleet. Use this type when routing to active fleets.", // "enum": [ // "SIMPLE", // "TERMINAL" // ], // "type": "string" // } // }, // "required": [ // "Type" // ], // "type": "object" // } Description: "A routing configuration that specifies where traffic is directed for this alias, such as to a fleet or to a message.", Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "fleet_id": { // Property: FleetId Description: "A unique identifier for a fleet that the alias points to. If you specify SIMPLE for the Type property, you must specify this property.", Type: types.StringType, Computed: true, }, "message": { // Property: Message Description: "The message text to be used with a terminal routing strategy. If you specify TERMINAL for the Type property, you must specify this property.", Type: types.StringType, Computed: true, }, "type": { // Property: Type Description: "Simple routing strategy. The alias resolves to one specific fleet. Use this type when routing to active fleets.", Type: types.StringType, Computed: true, }, }, ), 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::GameLift::Alias", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::GameLift::Alias").WithTerraformTypeName("awscc_gamelift_alias") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "alias_id": "AliasId", "description": "Description", "fleet_id": "FleetId", "message": "Message", "name": "Name", "routing_strategy": "RoutingStrategy", "type": "Type", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }