Movatterモバイル変換


[0]ホーム

URL:


identityschema

package
v1.17.0Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2025 License:MPL-2.0Imports:9Imported by:3

Details

Repository

github.com/hashicorp/terraform-plugin-framework

Links

Documentation

Overview

Package identityschema contains all available schema functionality for managedresource identity.

Resource identity schemas define the structure and value types for identity state data.Schemas are implemented via the resource.ResourceWithIdentity type IdentitySchema method.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeAttribute

type Attribute interface {fwschema.Attribute}

Attribute define a value field inside the Schema. Implementations in thispackage include:

  • BoolAttribute
  • Float32Attribute
  • Float64Attribute
  • Int32Attribute
  • Int64Attribute
  • ListAttribute
  • NumberAttribute
  • StringAttribute

The available attribute types for a resource identity schema are intentionallylimited. Nested attributes and blocks are not supported in identity schemas,as well as ListAttribute definitions can only have primitive element types of:

  • types.BoolType
  • types.Float32Type
  • types.Float64Type
  • types.Int32Type
  • types.Int64Type
  • types.NumberType
  • types.StringType

typeBoolAttribute

type BoolAttribute struct {// CustomType enables the use of a custom attribute type in place of the// default basetypes.BoolType. When retrieving data, the basetypes.BoolValuable// associated with this custom type must be used in place of types.Bool.CustomTypebasetypes.BoolTypable// RequiredForImport indicates whether the practitioner must enter a value for// this attribute when importing a managed resource by this identity.// RequiredForImport and OptionalForImport cannot both be true.RequiredForImportbool// OptionalForImport indicates whether the practitioner can choose to enter a value// for this attribute when importing a managed resource by this identity.// OptionalForImport and RequiredForImport cannot both be true.OptionalForImportbool// Description is used in various tooling, like the language server or the documentation// generator, to give practitioners more information about what this attribute is,// what it's for, and how it should be used. It can be written as plain text with no// special formatting, or formatted as Markdown.Descriptionstring}

BoolAttribute represents a schema attribute that is a boolean. Whenretrieving the value for this attribute, use types.Bool as the value typeunless the CustomType field is set.

Terraform configurations configure this attribute using expressions thatreturn a boolean or directly via the true/false keywords.

example_attribute = true

func (BoolAttribute)ApplyTerraform5AttributePathStep

func (aBoolAttribute) ApplyTerraform5AttributePathStep(steptftypes.AttributePathStep) (interface{},error)

ApplyTerraform5AttributePathStep always returns an error as it is notpossible to step further into a BoolAttribute.

func (BoolAttribute)Equal

Equal returns true if the given Attribute is a BoolAttributeand all fields are equal.

func (BoolAttribute)GetDeprecationMessage

func (aBoolAttribute) GetDeprecationMessage()string

GetDeprecationMessage returns an empty string as identity attributes cannotsurface deprecation messages.

func (BoolAttribute)GetDescription

func (aBoolAttribute) GetDescription()string

GetDescription returns the Description field value. For identity attributes,there is only a single description field that is permitted to contain plaintext or Markdown.

func (BoolAttribute)GetMarkdownDescription

func (aBoolAttribute) GetMarkdownDescription()string

GetMarkdownDescription returns the Description field value. For identity attributes,there is only a single description field that is permitted to contain Markdown or plaintext.

func (BoolAttribute)GetType

func (aBoolAttribute) GetType()attr.Type

GetType returns types.StringType or the CustomType field value if defined.

func (BoolAttribute)IsComputed

func (aBoolAttribute) IsComputed()bool

IsComputed returns false as it's not relevant for identity schemas.

func (BoolAttribute)IsOptional

func (aBoolAttribute) IsOptional()bool

IsOptional returns false as it's not relevant for identity schemas.

func (BoolAttribute)IsOptionalForImport

func (aBoolAttribute) IsOptionalForImport()bool

IsOptionalForImport returns the OptionalForImport field value.

func (BoolAttribute)IsRequired

func (aBoolAttribute) IsRequired()bool

IsRequired returns false as it's not relevant for identity schemas.

func (BoolAttribute)IsRequiredForImport

func (aBoolAttribute) IsRequiredForImport()bool

IsRequiredForImport returns the RequiredForImport field value.

func (BoolAttribute)IsSensitive

func (aBoolAttribute) IsSensitive()bool

IsSensitive returns false as it's not relevant for identity schemas.

func (BoolAttribute)IsWriteOnly

func (aBoolAttribute) IsWriteOnly()bool

IsWriteOnly returns false as it's not relevant for identity schemas.

typeFloat32Attribute

type Float32Attribute struct {// CustomType enables the use of a custom attribute type in place of the// default basetypes.Float32Type. When retrieving data, the basetypes.Float32Valuable// associated with this custom type must be used in place of types.Float32.CustomTypebasetypes.Float32Typable// RequiredForImport indicates whether the practitioner must enter a value for// this attribute when importing a managed resource by this identity.// RequiredForImport and OptionalForImport cannot both be true.RequiredForImportbool// OptionalForImport indicates whether the practitioner can choose to enter a value// for this attribute when importing a managed resource by this identity.// OptionalForImport and RequiredForImport cannot both be true.OptionalForImportbool// Description is used in various tooling, like the language server or the documentation// generator, to give practitioners more information about what this attribute is,// what it's for, and how it should be used. It can be written as plain text with no// special formatting, or formatted as Markdown.Descriptionstring}

Float32Attribute represents a schema attribute that is a 32-bit floatingpoint number. When retrieving the value for this attribute, usetypes.Float32 as the value type unless the CustomType field is set.

Use Int32Attribute for 32-bit integer attributes or NumberAttribute for512-bit generic number attributes.

Terraform configurations configure this attribute using expressions thatreturn a number or directly via a floating point value.

example_attribute = 123.45

func (Float32Attribute)ApplyTerraform5AttributePathStep

func (aFloat32Attribute) ApplyTerraform5AttributePathStep(steptftypes.AttributePathStep) (interface{},error)

ApplyTerraform5AttributePathStep always returns an error as it is notpossible to step further into a Float32Attribute.

func (Float32Attribute)Equal

Equal returns true if the given Attribute is a Float32Attributeand all fields are equal.

func (Float32Attribute)GetDeprecationMessage

func (aFloat32Attribute) GetDeprecationMessage()string

GetDeprecationMessage returns an empty string as identity attributes cannotsurface deprecation messages.

func (Float32Attribute)GetDescription

func (aFloat32Attribute) GetDescription()string

GetDescription returns the Description field value. For identity attributes,there is only a single description field that is permitted to contain plaintext or Markdown.

func (Float32Attribute)GetMarkdownDescription

func (aFloat32Attribute) GetMarkdownDescription()string

GetMarkdownDescription returns the Description field value. For identity attributes,there is only a single description field that is permitted to contain Markdown or plaintext.

func (Float32Attribute)GetType

func (aFloat32Attribute) GetType()attr.Type

GetType returns types.Float32Type or the CustomType field value if defined.

func (Float32Attribute)IsComputed

func (aFloat32Attribute) IsComputed()bool

IsComputed returns false as it's not relevant for identity schemas.

func (Float32Attribute)IsOptional

func (aFloat32Attribute) IsOptional()bool

IsOptional returns false as it's not relevant for identity schemas.

func (Float32Attribute)IsOptionalForImport

func (aFloat32Attribute) IsOptionalForImport()bool

IsOptionalForImport returns the OptionalForImport field value.

func (Float32Attribute)IsRequired

func (aFloat32Attribute) IsRequired()bool

IsRequired returns false as it's not relevant for identity schemas.

func (Float32Attribute)IsRequiredForImport

func (aFloat32Attribute) IsRequiredForImport()bool

IsRequiredForImport returns the RequiredForImport field value.

func (Float32Attribute)IsSensitive

func (aFloat32Attribute) IsSensitive()bool

IsSensitive returns false as it's not relevant for identity schemas.

func (Float32Attribute)IsWriteOnly

func (aFloat32Attribute) IsWriteOnly()bool

IsWriteOnly returns false as it's not relevant for identity schemas.

typeFloat64Attribute

type Float64Attribute struct {// CustomType enables the use of a custom attribute type in place of the// default basetypes.Float64Type. When retrieving data, the basetypes.Float64Valuable// associated with this custom type must be used in place of types.Float64.CustomTypebasetypes.Float64Typable// RequiredForImport indicates whether the practitioner must enter a value for// this attribute when importing a managed resource by this identity.// RequiredForImport and OptionalForImport cannot both be true.RequiredForImportbool// OptionalForImport indicates whether the practitioner can choose to enter a value// for this attribute when importing a managed resource by this identity.// OptionalForImport and RequiredForImport cannot both be true.OptionalForImportbool// Description is used in various tooling, like the language server or the documentation// generator, to give practitioners more information about what this attribute is,// what it's for, and how it should be used. It can be written as plain text with no// special formatting, or formatted as Markdown.Descriptionstring}

Float64Attribute represents a schema attribute that is a 64-bit floatingpoint number. When retrieving the value for this attribute, usetypes.Float64 as the value type unless the CustomType field is set.

Use Int64Attribute for 64-bit integer attributes or NumberAttribute for512-bit generic number attributes.

Terraform configurations configure this attribute using expressions thatreturn a number or directly via a floating point value.

example_attribute = 123.45

func (Float64Attribute)ApplyTerraform5AttributePathStep

func (aFloat64Attribute) ApplyTerraform5AttributePathStep(steptftypes.AttributePathStep) (interface{},error)

ApplyTerraform5AttributePathStep always returns an error as it is notpossible to step further into a Float64Attribute.

func (Float64Attribute)Equal

Equal returns true if the given Attribute is a Float64Attributeand all fields are equal.

func (Float64Attribute)GetDeprecationMessage

func (aFloat64Attribute) GetDeprecationMessage()string

GetDeprecationMessage returns an empty string as identity attributes cannotsurface deprecation messages.

func (Float64Attribute)GetDescription

func (aFloat64Attribute) GetDescription()string

GetDescription returns the Description field value. For identity attributes,there is only a single description field that is permitted to contain plaintext or Markdown.

func (Float64Attribute)GetMarkdownDescription

func (aFloat64Attribute) GetMarkdownDescription()string

GetMarkdownDescription returns the Description field value. For identity attributes,there is only a single description field that is permitted to contain Markdown or plaintext.

func (Float64Attribute)GetType

func (aFloat64Attribute) GetType()attr.Type

GetType returns types.Float64Type or the CustomType field value if defined.

func (Float64Attribute)IsComputed

func (aFloat64Attribute) IsComputed()bool

IsComputed returns false as it's not relevant for identity schemas.

func (Float64Attribute)IsOptional

func (aFloat64Attribute) IsOptional()bool

IsOptional returns false as it's not relevant for identity schemas.

func (Float64Attribute)IsOptionalForImport

func (aFloat64Attribute) IsOptionalForImport()bool

IsOptionalForImport returns the OptionalForImport field value.

func (Float64Attribute)IsRequired

func (aFloat64Attribute) IsRequired()bool

IsRequired returns false as it's not relevant for identity schemas.

func (Float64Attribute)IsRequiredForImport

func (aFloat64Attribute) IsRequiredForImport()bool

IsRequiredForImport returns the RequiredForImport field value.

func (Float64Attribute)IsSensitive

func (aFloat64Attribute) IsSensitive()bool

IsSensitive returns false as it's not relevant for identity schemas.

func (Float64Attribute)IsWriteOnly

func (aFloat64Attribute) IsWriteOnly()bool

IsWriteOnly returns false as it's not relevant for identity schemas.

typeInt32Attribute

type Int32Attribute struct {// CustomType enables the use of a custom attribute type in place of the// default basetypes.Int32Type. When retrieving data, the basetypes.Int32Valuable// associated with this custom type must be used in place of types.Int32.CustomTypebasetypes.Int32Typable// RequiredForImport indicates whether the practitioner must enter a value for// this attribute when importing a managed resource by this identity.// RequiredForImport and OptionalForImport cannot both be true.RequiredForImportbool// OptionalForImport indicates whether the practitioner can choose to enter a value// for this attribute when importing a managed resource by this identity.// OptionalForImport and RequiredForImport cannot both be true.OptionalForImportbool// Description is used in various tooling, like the language server or the documentation// generator, to give practitioners more information about what this attribute is,// what it's for, and how it should be used. It can be written as plain text with no// special formatting, or formatted as Markdown.Descriptionstring}

Int32Attribute represents a schema attribute that is a 32-bit integer.When retrieving the value for this attribute, use types.Int32 as the valuetype unless the CustomType field is set.

Use Float32Attribute for 32-bit floating point number attributes orNumberAttribute for 512-bit generic number attributes.

Terraform configurations configure this attribute using expressions thatreturn a number or directly via an integer value.

example_attribute = 123

func (Int32Attribute)ApplyTerraform5AttributePathStep

func (aInt32Attribute) ApplyTerraform5AttributePathStep(steptftypes.AttributePathStep) (interface{},error)

ApplyTerraform5AttributePathStep always returns an error as it is notpossible to step further into a Int32Attribute.

func (Int32Attribute)Equal

Equal returns true if the given Attribute is a Int32Attributeand all fields are equal.

func (Int32Attribute)GetDeprecationMessage

func (aInt32Attribute) GetDeprecationMessage()string

GetDeprecationMessage returns an empty string as identity attributes cannotsurface deprecation messages.

func (Int32Attribute)GetDescription

func (aInt32Attribute) GetDescription()string

GetDescription returns the Description field value. For identity attributes,there is only a single description field that is permitted to contain plaintext or Markdown.

func (Int32Attribute)GetMarkdownDescription

func (aInt32Attribute) GetMarkdownDescription()string

GetMarkdownDescription returns the Description field value. For identity attributes,there is only a single description field that is permitted to contain Markdown or plaintext.

func (Int32Attribute)GetType

func (aInt32Attribute) GetType()attr.Type

GetType returns types.Int32Type or the CustomType field value if defined.

func (Int32Attribute)IsComputed

func (aInt32Attribute) IsComputed()bool

IsComputed returns false as it's not relevant for identity schemas.

func (Int32Attribute)IsOptional

func (aInt32Attribute) IsOptional()bool

IsOptional returns false as it's not relevant for identity schemas.

func (Int32Attribute)IsOptionalForImport

func (aInt32Attribute) IsOptionalForImport()bool

IsOptionalForImport returns the OptionalForImport field value.

func (Int32Attribute)IsRequired

func (aInt32Attribute) IsRequired()bool

IsRequired returns false as it's not relevant for identity schemas.

func (Int32Attribute)IsRequiredForImport

func (aInt32Attribute) IsRequiredForImport()bool

IsRequiredForImport returns the RequiredForImport field value.

func (Int32Attribute)IsSensitive

func (aInt32Attribute) IsSensitive()bool

IsSensitive returns false as it's not relevant for identity schemas.

func (Int32Attribute)IsWriteOnly

func (aInt32Attribute) IsWriteOnly()bool

IsWriteOnly returns false as it's not relevant for identity schemas.

typeInt64Attribute

type Int64Attribute struct {// CustomType enables the use of a custom attribute type in place of the// default basetypes.Int64Type. When retrieving data, the basetypes.Int64Valuable// associated with this custom type must be used in place of types.Int64.CustomTypebasetypes.Int64Typable// RequiredForImport indicates whether the practitioner must enter a value for// this attribute when importing a managed resource by this identity.// RequiredForImport and OptionalForImport cannot both be true.RequiredForImportbool// OptionalForImport indicates whether the practitioner can choose to enter a value// for this attribute when importing a managed resource by this identity.// OptionalForImport and RequiredForImport cannot both be true.OptionalForImportbool// Description is used in various tooling, like the language server or the documentation// generator, to give practitioners more information about what this attribute is,// what it's for, and how it should be used. It can be written as plain text with no// special formatting, or formatted as Markdown.Descriptionstring}

Int64Attribute represents a schema attribute that is a 64-bit integer.When retrieving the value for this attribute, use types.Int64 as the valuetype unless the CustomType field is set.

Use Float64Attribute for 64-bit floating point number attributes orNumberAttribute for 512-bit generic number attributes.

Terraform configurations configure this attribute using expressions thatreturn a number or directly via an integer value.

example_attribute = 123

func (Int64Attribute)ApplyTerraform5AttributePathStep

func (aInt64Attribute) ApplyTerraform5AttributePathStep(steptftypes.AttributePathStep) (interface{},error)

ApplyTerraform5AttributePathStep always returns an error as it is notpossible to step further into a Int64Attribute.

func (Int64Attribute)Equal

Equal returns true if the given Attribute is a Int64Attributeand all fields are equal.

func (Int64Attribute)GetDeprecationMessage

func (aInt64Attribute) GetDeprecationMessage()string

GetDeprecationMessage returns an empty string as identity attributes cannotsurface deprecation messages.

func (Int64Attribute)GetDescription

func (aInt64Attribute) GetDescription()string

GetDescription returns the Description field value. For identity attributes,there is only a single description field that is permitted to contain plaintext or Markdown.

func (Int64Attribute)GetMarkdownDescription

func (aInt64Attribute) GetMarkdownDescription()string

GetMarkdownDescription returns the Description field value. For identity attributes,there is only a single description field that is permitted to contain Markdown or plaintext.

func (Int64Attribute)GetType

func (aInt64Attribute) GetType()attr.Type

GetType returns types.Int64Type or the CustomType field value if defined.

func (Int64Attribute)IsComputed

func (aInt64Attribute) IsComputed()bool

IsComputed returns false as it's not relevant for identity schemas.

func (Int64Attribute)IsOptional

func (aInt64Attribute) IsOptional()bool

IsOptional returns false as it's not relevant for identity schemas.

func (Int64Attribute)IsOptionalForImport

func (aInt64Attribute) IsOptionalForImport()bool

IsOptionalForImport returns the OptionalForImport field value.

func (Int64Attribute)IsRequired

func (aInt64Attribute) IsRequired()bool

IsRequired returns false as it's not relevant for identity schemas.

func (Int64Attribute)IsRequiredForImport

func (aInt64Attribute) IsRequiredForImport()bool

IsRequiredForImport returns the RequiredForImport field value.

func (Int64Attribute)IsSensitive

func (aInt64Attribute) IsSensitive()bool

IsSensitive returns false as it's not relevant for identity schemas.

func (Int64Attribute)IsWriteOnly

func (aInt64Attribute) IsWriteOnly()bool

IsWriteOnly returns false as it's not relevant for identity schemas.

typeListAttribute

type ListAttribute struct {// ElementType is the type for all elements of the list. This field must be// set.//// ElementType must be a primitive, which are://   - types.BoolType//   - types.Float32Type//   - types.Float64Type//   - types.Int32Type//   - types.Int64Type//   - types.NumberType//   - types.StringTypeElementTypeattr.Type// CustomType enables the use of a custom attribute type in place of the// default basetypes.ListType. When retrieving data, the basetypes.ListValuable// associated with this custom type must be used in place of types.List.CustomTypebasetypes.ListTypable// RequiredForImport indicates whether the practitioner must enter a value for// this attribute when importing a managed resource by this identity.// RequiredForImport and OptionalForImport cannot both be true.RequiredForImportbool// OptionalForImport indicates whether the practitioner can choose to enter a value// for this attribute when importing a managed resource by this identity.// OptionalForImport and RequiredForImport cannot both be true.OptionalForImportbool// Description is used in various tooling, like the language server or the documentation// generator, to give practitioners more information about what this attribute is,// what it's for, and how it should be used. It can be written as plain text with no// special formatting, or formatted as Markdown.Descriptionstring}

ListAttribute represents a schema attribute that is a list with a singleelement type. When retrieving the value for this attribute, use types.Listas the value type unless the CustomType field is set. The ElementType fieldmust be set.

In identity schemas, ListAttribute is only permitted to have a primitive ElementType,which are:

  • types.BoolType
  • types.Float32Type
  • types.Float64Type
  • types.Int32Type
  • types.Int64Type
  • types.NumberType
  • types.StringType

Terraform configurations configure this attribute using expressions thatreturn a list or directly via square brace syntax.

# list of stringsexample_attribute = ["first", "second"]

func (ListAttribute)ApplyTerraform5AttributePathStep

func (aListAttribute) ApplyTerraform5AttributePathStep(steptftypes.AttributePathStep) (interface{},error)

ApplyTerraform5AttributePathStep returns the result of stepping into a listindex or an error.

func (ListAttribute)Equal

Equal returns true if the given Attribute is a ListAttributeand all fields are equal.

func (ListAttribute)GetDeprecationMessage

func (aListAttribute) GetDeprecationMessage()string

GetDeprecationMessage returns an empty string as identity attributes cannotsurface deprecation messages.

func (ListAttribute)GetDescription

func (aListAttribute) GetDescription()string

GetDescription returns the Description field value. For identity attributes,there is only a single description field that is permitted to contain plaintext or Markdown.

func (ListAttribute)GetMarkdownDescription

func (aListAttribute) GetMarkdownDescription()string

GetMarkdownDescription returns the Description field value. For identity attributes,there is only a single description field that is permitted to contain Markdown or plaintext.

func (ListAttribute)GetType

func (aListAttribute) GetType()attr.Type

GetType returns types.ListType or the CustomType field value if defined.

func (ListAttribute)IsComputed

func (aListAttribute) IsComputed()bool

IsComputed returns false as it's not relevant for identity schemas.

func (ListAttribute)IsOptional

func (aListAttribute) IsOptional()bool

IsOptional returns false as it's not relevant for identity schemas.

func (ListAttribute)IsOptionalForImport

func (aListAttribute) IsOptionalForImport()bool

IsOptionalForImport returns the OptionalForImport field value.

func (ListAttribute)IsRequired

func (aListAttribute) IsRequired()bool

IsRequired returns false as it's not relevant for identity schemas.

func (ListAttribute)IsRequiredForImport

func (aListAttribute) IsRequiredForImport()bool

IsRequiredForImport returns the RequiredForImport field value.

func (ListAttribute)IsSensitive

func (aListAttribute) IsSensitive()bool

IsSensitive returns false as it's not relevant for identity schemas.

func (ListAttribute)IsWriteOnly

func (aListAttribute) IsWriteOnly()bool

IsWriteOnly returns false as it's not relevant for identity schemas.

func (ListAttribute)ValidateImplementation

ValidateImplementation contains logic for validating theprovider-defined implementation of the attribute to prevent unexpectederrors or panics. This logic runs during the GetResourceIdentitySchemas RPC andshould never include false positives.

typeNumberAttribute

type NumberAttribute struct {// CustomType enables the use of a custom attribute type in place of the// default basetypes.NumberType. When retrieving data, the basetypes.NumberValuable// associated with this custom type must be used in place of types.Number.CustomTypebasetypes.NumberTypable// RequiredForImport indicates whether the practitioner must enter a value for// this attribute when importing a managed resource by this identity.// RequiredForImport and OptionalForImport cannot both be true.RequiredForImportbool// OptionalForImport indicates whether the practitioner can choose to enter a value// for this attribute when importing a managed resource by this identity.// OptionalForImport and RequiredForImport cannot both be true.OptionalForImportbool// Description is used in various tooling, like the language server or the documentation// generator, to give practitioners more information about what this attribute is,// what it's for, and how it should be used. It can be written as plain text with no// special formatting, or formatted as Markdown.Descriptionstring}

NumberAttribute represents a schema attribute that is a generic number withup to 512 bits of floating point or integer precision. When retrieving thevalue for this attribute, use types.Number as the value type unless theCustomType field is set.

Use Float64Attribute for 64-bit floating point number attributes orInt64Attribute for 64-bit integer number attributes.

Terraform configurations configure this attribute using expressions thatreturn a number or directly via a floating point or integer value.

example_attribute = 123

func (NumberAttribute)ApplyTerraform5AttributePathStep

func (aNumberAttribute) ApplyTerraform5AttributePathStep(steptftypes.AttributePathStep) (interface{},error)

ApplyTerraform5AttributePathStep always returns an error as it is notpossible to step further into a NumberAttribute.

func (NumberAttribute)Equal

Equal returns true if the given Attribute is a NumberAttributeand all fields are equal.

func (NumberAttribute)GetDeprecationMessage

func (aNumberAttribute) GetDeprecationMessage()string

GetDeprecationMessage returns an empty string as identity attributes cannotsurface deprecation messages.

func (NumberAttribute)GetDescription

func (aNumberAttribute) GetDescription()string

GetDescription returns the Description field value. For identity attributes,there is only a single description field that is permitted to contain plaintext or Markdown.

func (NumberAttribute)GetMarkdownDescription

func (aNumberAttribute) GetMarkdownDescription()string

GetMarkdownDescription returns the Description field value. For identity attributes,there is only a single description field that is permitted to contain Markdown or plaintext.

func (NumberAttribute)GetType

func (aNumberAttribute) GetType()attr.Type

GetType returns types.NumberType or the CustomType field value if defined.

func (NumberAttribute)IsComputed

func (aNumberAttribute) IsComputed()bool

IsComputed returns false as it's not relevant for identity schemas.

func (NumberAttribute)IsOptional

func (aNumberAttribute) IsOptional()bool

IsOptional returns false as it's not relevant for identity schemas.

func (NumberAttribute)IsOptionalForImport

func (aNumberAttribute) IsOptionalForImport()bool

IsOptionalForImport returns the OptionalForImport field value.

func (NumberAttribute)IsRequired

func (aNumberAttribute) IsRequired()bool

IsRequired returns false as it's not relevant for identity schemas.

func (NumberAttribute)IsRequiredForImport

func (aNumberAttribute) IsRequiredForImport()bool

IsRequiredForImport returns the RequiredForImport field value.

func (NumberAttribute)IsSensitive

func (aNumberAttribute) IsSensitive()bool

IsSensitive returns false as it's not relevant for identity schemas.

func (NumberAttribute)IsWriteOnly

func (aNumberAttribute) IsWriteOnly()bool

IsWriteOnly returns false as it's not relevant for identity schemas.

typeSchema

type Schema struct {// Attributes is the mapping of underlying attribute names to attribute// definitions.//// Names must only contain lowercase letters, numbers, and underscores.Attributes map[string]Attribute// Version indicates the current version of the resource identity schema. Resource// identity schema versioning enables identity state upgrades in conjunction with the// [resource.ResourceWithUpgradeIdentity] interface. Versioning is only// required if there is a breaking change involving existing identity state data,// such as changing an attribute type in a manner that is incompatible with the Terraform type.//// Versions are conventionally only incremented by one each release.Versionint64}

Schema defines the structure and value types of resource identity data. This typeis used as the resource.IdentitySchemaResponse type IdentitySchema field, which isimplemented by the resource.ResourceWithIdentity type IdentitySchema method.

func (Schema)ApplyTerraform5AttributePathStep

func (sSchema) ApplyTerraform5AttributePathStep(steptftypes.AttributePathStep) (any,error)

ApplyTerraform5AttributePathStep applies the given AttributePathStep to theschema.

func (Schema)AttributeAtPath

func (sSchema) AttributeAtPath(ctxcontext.Context, ppath.Path) (fwschema.Attribute,diag.Diagnostics)

AttributeAtPath returns the Attribute at the passed path. If the path pointsto an element or attribute of a complex type, rather than to an Attribute,it will return an ErrPathInsideAtomicAttribute error.

func (Schema)AttributeAtTerraformPath

func (sSchema) AttributeAtTerraformPath(ctxcontext.Context, p *tftypes.AttributePath) (fwschema.Attribute,error)

AttributeAtPath returns the Attribute at the passed path. If the path pointsto an element or attribute of a complex type, rather than to an Attribute,it will return an ErrPathInsideAtomicAttribute error.

func (Schema)GetAttributes

func (sSchema) GetAttributes() map[string]fwschema.Attribute

GetAttributes returns the Attributes field value.

func (Schema)GetBlocks

func (sSchema) GetBlocks() map[string]fwschema.Block

GetBlocks returns an empty map as it's not relevant for identity schemas.

func (Schema)GetDeprecationMessage

func (sSchema) GetDeprecationMessage()string

GetDeprecationMessage returns an empty string as identity schemas cannotsurface deprecation messages.

func (Schema)GetDescription

func (sSchema) GetDescription()string

GetDescription returns an empty string as identity schemas cannotsurface descriptions.

func (Schema)GetMarkdownDescription

func (sSchema) GetMarkdownDescription()string

GetMarkdownDescription returns an empty string as identity schemas cannotsurface descriptions.

func (Schema)GetVersion

func (sSchema) GetVersion()int64

GetVersion returns the Version field value.

func (Schema)Type

func (sSchema) Type()attr.Type

Type returns the framework type of the schema.

func (Schema)TypeAtPath

func (sSchema) TypeAtPath(ctxcontext.Context, ppath.Path) (attr.Type,diag.Diagnostics)

TypeAtPath returns the framework type at the given schema path.

func (Schema)TypeAtTerraformPath

func (sSchema) TypeAtTerraformPath(ctxcontext.Context, p *tftypes.AttributePath) (attr.Type,error)

TypeAtTerraformPath returns the framework type at the given tftypes path.

func (Schema)Validatedeprecated

func (sSchema) Validate()diag.Diagnostics

Validate verifies that the schema is not using a reserved field name for a top-level attribute.

Deprecated: Use the ValidateImplementation method instead.

func (Schema)ValidateImplementation

func (sSchema) ValidateImplementation(ctxcontext.Context)diag.Diagnostics

ValidateImplementation contains logic for validating the provider-definedimplementation of the schema and underlying attributes and blocks to preventunexpected errors or panics. This logic runs during theGetResourceIdentitySchemas RPC, or via provider-defined unit testing, and shouldnever include false positives.

typeStringAttribute

type StringAttribute struct {// CustomType enables the use of a custom attribute type in place of the// default basetypes.StringType. When retrieving data, the basetypes.StringValuable// associated with this custom type must be used in place of types.String.CustomTypebasetypes.StringTypable// RequiredForImport indicates whether the practitioner must enter a value for// this attribute when importing a managed resource by this identity.// RequiredForImport and OptionalForImport cannot both be true.RequiredForImportbool// OptionalForImport indicates whether the practitioner can choose to enter a value// for this attribute when importing a managed resource by this identity.// OptionalForImport and RequiredForImport cannot both be true.OptionalForImportbool// Description is used in various tooling, like the language server or the documentation// generator, to give practitioners more information about what this attribute is,// what it's for, and how it should be used. It can be written as plain text with no// special formatting, or formatted as Markdown.Descriptionstring}

StringAttribute represents a schema attribute that is a string. Whenretrieving the value for this attribute, use types.String as the value typeunless the CustomType field is set.

Terraform configurations configure this attribute using expressions thatreturn a string or directly via double quote syntax.

example_attribute = "value"

func (StringAttribute)ApplyTerraform5AttributePathStep

func (aStringAttribute) ApplyTerraform5AttributePathStep(steptftypes.AttributePathStep) (interface{},error)

ApplyTerraform5AttributePathStep always returns an error as it is notpossible to step further into a StringAttribute.

func (StringAttribute)Equal

Equal returns true if the given Attribute is a StringAttributeand all fields are equal.

func (StringAttribute)GetDeprecationMessage

func (aStringAttribute) GetDeprecationMessage()string

GetDeprecationMessage returns an empty string as identity attributes cannotsurface deprecation messages.

func (StringAttribute)GetDescription

func (aStringAttribute) GetDescription()string

GetDescription returns the Description field value. For identity attributes,there is only a single description field that is permitted to contain plaintext or Markdown.

func (StringAttribute)GetMarkdownDescription

func (aStringAttribute) GetMarkdownDescription()string

GetMarkdownDescription returns the Description field value. For identity attributes,there is only a single description field that is permitted to contain Markdown or plaintext.

func (StringAttribute)GetType

func (aStringAttribute) GetType()attr.Type

GetType returns types.StringType or the CustomType field value if defined.

func (StringAttribute)IsComputed

func (aStringAttribute) IsComputed()bool

IsComputed returns false as it's not relevant for identity schemas.

func (StringAttribute)IsOptional

func (aStringAttribute) IsOptional()bool

IsOptional returns false as it's not relevant for identity schemas.

func (StringAttribute)IsOptionalForImport

func (aStringAttribute) IsOptionalForImport()bool

IsOptionalForImport returns the OptionalForImport field value.

func (StringAttribute)IsRequired

func (aStringAttribute) IsRequired()bool

IsRequired returns false as it's not relevant for identity schemas.

func (StringAttribute)IsRequiredForImport

func (aStringAttribute) IsRequiredForImport()bool

IsRequiredForImport returns the RequiredForImport field value.

func (StringAttribute)IsSensitive

func (aStringAttribute) IsSensitive()bool

IsSensitive returns false as it's not relevant for identity schemas.

func (StringAttribute)IsWriteOnly

func (aStringAttribute) IsWriteOnly()bool

IsWriteOnly returns false as it's not relevant for identity schemas.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp