// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package batch 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_batch_scheduling_policy", schedulingPolicyDataSourceType) } // schedulingPolicyDataSourceType returns the Terraform awscc_batch_scheduling_policy data source type. // This Terraform data source type corresponds to the CloudFormation AWS::Batch::SchedulingPolicy resource type. func schedulingPolicyDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "arn": { // Property: Arn // CloudFormation resource type schema: // { // "description": "ARN of the Scheduling Policy.", // "type": "string" // } Description: "ARN of the Scheduling Policy.", Type: types.StringType, Computed: true, }, "fairshare_policy": { // Property: FairsharePolicy // CloudFormation resource type schema: // { // "additionalProperties": false, // "description": "Fair Share Policy for the Job Queue.", // "properties": { // "ComputeReservation": { // "maximum": 99, // "minimum": 0, // "type": "number" // }, // "ShareDecaySeconds": { // "maximum": 604800, // "minimum": 0, // "type": "number" // }, // "ShareDistribution": { // "description": "List of Share Attributes", // "insertionOrder": false, // "items": { // "additionalProperties": false, // "properties": { // "ShareIdentifier": { // "type": "string" // }, // "WeightFactor": { // "maximum": 1000, // "minimum": 0, // "type": "number" // } // }, // "type": "object" // }, // "type": "array" // } // }, // "type": "object" // } Description: "Fair Share Policy for the Job Queue.", Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "compute_reservation": { // Property: ComputeReservation Type: types.Float64Type, Computed: true, }, "share_decay_seconds": { // Property: ShareDecaySeconds Type: types.Float64Type, Computed: true, }, "share_distribution": { // Property: ShareDistribution Description: "List of Share Attributes", Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "share_identifier": { // Property: ShareIdentifier Type: types.StringType, Computed: true, }, "weight_factor": { // Property: WeightFactor Type: types.Float64Type, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, }, ), Computed: true, }, "name": { // Property: Name // CloudFormation resource type schema: // { // "description": "Name of Scheduling Policy.", // "pattern": "", // "type": "string" // } Description: "Name of Scheduling Policy.", Type: types.StringType, Computed: true, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "additionalProperties": false, // "description": "A key-value pair to associate with a resource.", // "patternProperties": { // "": { // "type": "string" // } // }, // "type": "object" // } Description: "A key-value pair to associate with a resource.", // Pattern: "" Type: types.MapType{ElemType: 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::Batch::SchedulingPolicy", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::Batch::SchedulingPolicy").WithTerraformTypeName("awscc_batch_scheduling_policy") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "compute_reservation": "ComputeReservation", "fairshare_policy": "FairsharePolicy", "name": "Name", "share_decay_seconds": "ShareDecaySeconds", "share_distribution": "ShareDistribution", "share_identifier": "ShareIdentifier", "tags": "Tags", "weight_factor": "WeightFactor", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }