You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::CloudDirectory::Types::CreateFacetRequest

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-clouddirectory/lib/aws-sdk-clouddirectory/types.rb

Overview

Note:

When making an API call, you may pass CreateFacetRequest data as a hash:

{
  schema_arn: "Arn", # required
  name: "FacetName", # required
  attributes: [
    {
      name: "AttributeName", # required
      attribute_definition: {
        type: "STRING", # required, accepts STRING, BINARY, BOOLEAN, NUMBER, DATETIME, VARIANT
        default_value: {
          string_value: "StringAttributeValue",
          binary_value: "data",
          boolean_value: false,
          number_value: "NumberAttributeValue",
          datetime_value: Time.now,
        },
        is_immutable: false,
        rules: {
          "RuleKey" => {
            type: "BINARY_LENGTH", # accepts BINARY_LENGTH, NUMBER_COMPARISON, STRING_FROM_SET, STRING_LENGTH
            parameters: {
              "RuleParameterKey" => "RuleParameterValue",
            },
          },
        },
      },
      attribute_reference: {
        target_facet_name: "FacetName", # required
        target_attribute_name: "AttributeName", # required
      },
      required_behavior: "REQUIRED_ALWAYS", # accepts REQUIRED_ALWAYS, NOT_REQUIRED
    },
  ],
  object_type: "NODE", # accepts NODE, LEAF_NODE, POLICY, INDEX
  facet_style: "STATIC", # accepts STATIC, DYNAMIC
}

Instance Attribute Summary collapse

Instance Attribute Details

#attributesArray<Types::FacetAttribute>

The attributes that are associated with the Facet.

Returns:



3666
3667
3668
3669
3670
3671
3672
3673
# File 'gems/aws-sdk-clouddirectory/lib/aws-sdk-clouddirectory/types.rb', line 3666

class CreateFacetRequest < Struct.new(
  :schema_arn,
  :name,
  :attributes,
  :object_type,
  :facet_style)
  include Aws::Structure
end

#facet_styleString

There are two different styles that you can define on any given facet, Static and Dynamic. For static facets, all attributes must be defined in the schema. For dynamic facets, attributes can be defined during data plane operations.

Returns:

  • (String)


3666
3667
3668
3669
3670
3671
3672
3673
# File 'gems/aws-sdk-clouddirectory/lib/aws-sdk-clouddirectory/types.rb', line 3666

class CreateFacetRequest < Struct.new(
  :schema_arn,
  :name,
  :attributes,
  :object_type,
  :facet_style)
  include Aws::Structure
end

#nameString

The name of the Facet, which is unique for a given schema.

Returns:

  • (String)


3666
3667
3668
3669
3670
3671
3672
3673
# File 'gems/aws-sdk-clouddirectory/lib/aws-sdk-clouddirectory/types.rb', line 3666

class CreateFacetRequest < Struct.new(
  :schema_arn,
  :name,
  :attributes,
  :object_type,
  :facet_style)
  include Aws::Structure
end

#object_typeString

Specifies whether a given object created from this facet is of type node, leaf node, policy or index.

  • Node: Can have multiple children but one parent.

^ ^

  • Leaf node: Cannot have children but can have multiple parents.

^ ^

  • Policy: Allows you to store a policy document and policy type. For more information, see Policies.

^ ^

  • Index: Can be created with the Index API.

^

Returns:

  • (String)


3666
3667
3668
3669
3670
3671
3672
3673
# File 'gems/aws-sdk-clouddirectory/lib/aws-sdk-clouddirectory/types.rb', line 3666

class CreateFacetRequest < Struct.new(
  :schema_arn,
  :name,
  :attributes,
  :object_type,
  :facet_style)
  include Aws::Structure
end

#schema_arnString

The schema ARN in which the new Facet will be created. For more information, see arns.

Returns:

  • (String)


3666
3667
3668
3669
3670
3671
3672
3673
# File 'gems/aws-sdk-clouddirectory/lib/aws-sdk-clouddirectory/types.rb', line 3666

class CreateFacetRequest < Struct.new(
  :schema_arn,
  :name,
  :attributes,
  :object_type,
  :facet_style)
  include Aws::Structure
end