Interface Policy.Builder

All Superinterfaces:
Buildable, CopyableBuilder<Policy.Builder,Policy>, SdkBuilder<Policy.Builder,Policy>, SdkPojo
Enclosing class:
Policy

@Mutable @NotThreadSafe public static interface Policy.Builder extends SdkPojo, CopyableBuilder<Policy.Builder,Policy>
  • Method Details

    • policyId

      Policy.Builder policyId(String policyId)

      The unique identifier for the policy. This system-generated identifier consists of the user name plus a 10-character generated suffix and serves as the primary key for policy operations.

      Parameters:
      policyId - The unique identifier for the policy. This system-generated identifier consists of the user name plus a 10-character generated suffix and serves as the primary key for policy operations.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • name

      Policy.Builder name(String name)

      The customer-assigned immutable name for the policy. This human-readable identifier must be unique within the account and cannot exceed 48 characters.

      Parameters:
      name - The customer-assigned immutable name for the policy. This human-readable identifier must be unique within the account and cannot exceed 48 characters.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • policyEngineId

      Policy.Builder policyEngineId(String policyEngineId)

      The identifier of the policy engine that manages this policy. This establishes the policy engine context for policy evaluation and management.

      Parameters:
      policyEngineId - The identifier of the policy engine that manages this policy. This establishes the policy engine context for policy evaluation and management.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • definition

      Policy.Builder definition(PolicyDefinition definition)

      The Cedar policy statement that defines the access control rules. This contains the actual policy logic used for agent behavior control and access decisions.

      Parameters:
      definition - The Cedar policy statement that defines the access control rules. This contains the actual policy logic used for agent behavior control and access decisions.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • definition

      default Policy.Builder definition(Consumer<PolicyDefinition.Builder> definition)

      The Cedar policy statement that defines the access control rules. This contains the actual policy logic used for agent behavior control and access decisions.

      This is a convenience method that creates an instance of the PolicyDefinition.Builder avoiding the need to create one manually via PolicyDefinition.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to definition(PolicyDefinition).

      Parameters:
      definition - a consumer that will call methods on PolicyDefinition.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • description

      Policy.Builder description(String description)

      A human-readable description of the policy's purpose and functionality. Limited to 4,096 characters, this helps administrators understand and manage the policy.

      Parameters:
      description - A human-readable description of the policy's purpose and functionality. Limited to 4,096 characters, this helps administrators understand and manage the policy.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • createdAt

      Policy.Builder createdAt(Instant createdAt)

      The timestamp when the policy was originally created. This is automatically set by the service and used for auditing and lifecycle management.

      Parameters:
      createdAt - The timestamp when the policy was originally created. This is automatically set by the service and used for auditing and lifecycle management.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • updatedAt

      Policy.Builder updatedAt(Instant updatedAt)

      The timestamp when the policy was last modified. This tracks the most recent changes to the policy configuration or metadata.

      Parameters:
      updatedAt - The timestamp when the policy was last modified. This tracks the most recent changes to the policy configuration or metadata.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • policyArn

      Policy.Builder policyArn(String policyArn)

      The Amazon Resource Name (ARN) of the policy. This globally unique identifier can be used for cross-service references and IAM policy statements.

      Parameters:
      policyArn - The Amazon Resource Name (ARN) of the policy. This globally unique identifier can be used for cross-service references and IAM policy statements.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • status

      Policy.Builder status(String status)

      The current status of the policy.

      Parameters:
      status - The current status of the policy.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • status

      Policy.Builder status(PolicyStatus status)

      The current status of the policy.

      Parameters:
      status - The current status of the policy.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • statusReasons

      Policy.Builder statusReasons(Collection<String> statusReasons)

      Additional information about the policy status. This provides details about any failures or the current state of the policy lifecycle.

      Parameters:
      statusReasons - Additional information about the policy status. This provides details about any failures or the current state of the policy lifecycle.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • statusReasons

      Policy.Builder statusReasons(String... statusReasons)

      Additional information about the policy status. This provides details about any failures or the current state of the policy lifecycle.

      Parameters:
      statusReasons - Additional information about the policy status. This provides details about any failures or the current state of the policy lifecycle.
      Returns:
      Returns a reference to this object so that method calls can be chained together.