Class PolicyDefinition

    • Method Detail

      • staticValue

        public final StaticPolicyDefinition staticValue()

        A structure that describes a static policy. An static policy doesn't use a template or allow placeholders for entities.

        Returns:
        A structure that describes a static policy. An static policy doesn't use a template or allow placeholders for entities.
      • templateLinked

        public final TemplateLinkedPolicyDefinition templateLinked()

        A structure that describes a policy that was instantiated from a template. The template can specify placeholders for principal and resource. When you use CreatePolicy to create a policy from a template, you specify the exact principal and resource to use for the instantiated policy.

        Returns:
        A structure that describes a policy that was instantiated from a template. The template can specify placeholders for principal and resource. When you use CreatePolicy to create a policy from a template, you specify the exact principal and resource to use for the instantiated policy.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)
      • fromStaticValue

        public static PolicyDefinition fromStaticValue​(StaticPolicyDefinition staticValue)
        Create an instance of this class with staticValue() initialized to the given value.

        A structure that describes a static policy. An static policy doesn't use a template or allow placeholders for entities.

        Parameters:
        staticValue - A structure that describes a static policy. An static policy doesn't use a template or allow placeholders for entities.
      • fromStaticValue

        public static PolicyDefinition fromStaticValue​(Consumer<StaticPolicyDefinition.Builder> staticValue)
        Create an instance of this class with staticValue() initialized to the given value.

        A structure that describes a static policy. An static policy doesn't use a template or allow placeholders for entities.

        Parameters:
        staticValue - A structure that describes a static policy. An static policy doesn't use a template or allow placeholders for entities.
      • fromTemplateLinked

        public static PolicyDefinition fromTemplateLinked​(TemplateLinkedPolicyDefinition templateLinked)
        Create an instance of this class with templateLinked() initialized to the given value.

        A structure that describes a policy that was instantiated from a template. The template can specify placeholders for principal and resource. When you use CreatePolicy to create a policy from a template, you specify the exact principal and resource to use for the instantiated policy.

        Parameters:
        templateLinked - A structure that describes a policy that was instantiated from a template. The template can specify placeholders for principal and resource. When you use CreatePolicy to create a policy from a template, you specify the exact principal and resource to use for the instantiated policy.
      • fromTemplateLinked

        public static PolicyDefinition fromTemplateLinked​(Consumer<TemplateLinkedPolicyDefinition.Builder> templateLinked)
        Create an instance of this class with templateLinked() initialized to the given value.

        A structure that describes a policy that was instantiated from a template. The template can specify placeholders for principal and resource. When you use CreatePolicy to create a policy from a template, you specify the exact principal and resource to use for the instantiated policy.

        Parameters:
        templateLinked - A structure that describes a policy that was instantiated from a template. The template can specify placeholders for principal and resource. When you use CreatePolicy to create a policy from a template, you specify the exact principal and resource to use for the instantiated policy.