func()

in internal/provider/apikeys_data_source.go [59:123]


func (d *apiKeysDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
	resp.Schema = schema.Schema{
		Attributes: map[string]schema.Attribute{
			"apikeys": schema.ListNestedAttribute{
				Computed: true,
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"id": schema.Int64Attribute{
							Computed:    true,
							Description: "Numeric identifier for the apikey.",
						},
						"allowed_path": schema.StringAttribute{
							Computed:    true,
							Description: "The API URL or endpoint that the API key is permitted to access. It defines the specific resources that the key can interact with.",
						},
						"api_key": schema.StringAttribute{
							Computed:    true,
							Description: "The returned apikey, will always be empty for security reasons. If you want to use the apikey, you need to create a new resource.",
						},
						"created_at": schema.StringAttribute{
							Computed:    true,
							Description: "When the apikey was created.",
						},
						"creator": schema.StringAttribute{
							Computed:    true,
							Description: "Who created the apikey, there is no user management yet though.",
						},
						"creator_email": schema.StringAttribute{
							Computed:    true,
							Description: "Email of the person who created the apikey, there is no user management yet though.",
						},
						"expired_at": schema.StringAttribute{
							Computed:    true,
							Description: "When the apikey expires.",
						},
						"extra": schema.StringAttribute{
							Computed:    true,
							Description: "Currently not used.",
						},
						"name": schema.StringAttribute{
							Computed:    true,
							Description: "The name of the apikey.",
						},
						"type": schema.StringAttribute{
							Computed:    true,
							Description: "The apikey type. Currently only 'devlake' is a valid value.",
						},
						"updated_at": schema.StringAttribute{
							Computed:    true,
							Description: "When the apikey was last updated. Serves no purpose as the UPDATE endpoint doesn't do anything.",
						},
						"updater": schema.StringAttribute{
							Computed:    true,
							Description: "Who updated the apikey, there is no user management yet though.",
						},
						"updater_email": schema.StringAttribute{
							Computed:    true,
							Description: "Email of the person who updated the apikey, there is no user management yet though.",
						},
					},
				},
			},
		},
	}
}