@@ -10,7 +10,6 @@ import (
10
10
"github.com/aws/aws-sdk-go-v2/service/bedrock"
11
11
awstypes "github.com/aws/aws-sdk-go-v2/service/bedrock/types"
12
12
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
13
- "github.com/hashicorp/terraform-plugin-framework/attr"
14
13
"github.com/hashicorp/terraform-plugin-framework/datasource"
15
14
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
16
15
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
@@ -55,24 +54,8 @@ func (d *foundationModelsDataSource) Schema(ctx context.Context, request datasou
55
54
stringvalidator .RegexMatches (regexache .MustCompile (`^[A-Za-z0-9- ]{1,63}$` ), "" ),
56
55
},
57
56
},
58
- names .AttrID : framework .IDAttribute (),
59
- "model_summaries" : schema.ListAttribute {
60
- CustomType : fwtypes.NewListNestedObjectTypeOf [foundationModelSummaryModel ](ctx ),
61
- Computed : true ,
62
- ElementType : types.ObjectType {
63
- AttrTypes : map [string ]attr.Type {
64
- "customizations_supported" : types.SetType {ElemType : types .StringType },
65
- "inference_types_supported" : types.SetType {ElemType : types .StringType },
66
- "input_modalities" : types.SetType {ElemType : types .StringType },
67
- "model_arn" : types .StringType ,
68
- "model_id" : types .StringType ,
69
- "model_name" : types .StringType ,
70
- "output_modalities" : types.SetType {ElemType : types .StringType },
71
- names .AttrProviderName : types .StringType ,
72
- "response_streaming_supported" : types .BoolType ,
73
- },
74
- },
75
- },
57
+ names .AttrID : framework .IDAttribute (),
58
+ "model_summaries" : framework.DataSourceComputedListOfObjectAttribute [foundationModelSummaryModel ](ctx ),
76
59
},
77
60
}
78
61
}
@@ -120,13 +103,13 @@ type foundationModelsDataSourceModel struct {
120
103
}
121
104
122
105
type foundationModelSummaryModel struct {
123
- CustomizationsSupported fwtypes.SetValueOf [types. String ] `tfsdk:"customizations_supported"`
124
- InferenceTypesSupported fwtypes.SetValueOf [types. String ] `tfsdk:"inference_types_supported"`
125
- InputModalities fwtypes.SetValueOf [types. String ] `tfsdk:"input_modalities"`
126
- ModelARN types. String `tfsdk:"model_arn"`
127
- ModelID types.String `tfsdk:"model_id"`
128
- ModelName types.String `tfsdk:"model_name"`
129
- OutputModalities fwtypes.SetValueOf [types. String ] `tfsdk:"output_modalities"`
130
- ProviderName types.String `tfsdk:"provider_name"`
131
- ResponseStreamingSupported types.Bool `tfsdk:"response_streaming_supported"`
106
+ CustomizationsSupported fwtypes.SetOfString `tfsdk:"customizations_supported"`
107
+ InferenceTypesSupported fwtypes.SetOfString `tfsdk:"inference_types_supported"`
108
+ InputModalities fwtypes.SetOfString `tfsdk:"input_modalities"`
109
+ ModelARN fwtypes. ARN `tfsdk:"model_arn"`
110
+ ModelID types.String `tfsdk:"model_id"`
111
+ ModelName types.String `tfsdk:"model_name"`
112
+ OutputModalities fwtypes.SetOfString `tfsdk:"output_modalities"`
113
+ ProviderName types.String `tfsdk:"provider_name"`
114
+ ResponseStreamingSupported types.Bool `tfsdk:"response_streaming_supported"`
132
115
}
0 commit comments