Package io.vertx.ext.consul.policy

## Class AclPolicy

- java.lang.Object
- - io.vertx.ext.consul.policy.AclPolicy

-     public class AclPolicy
      extends Object

  Holds properties of Acl policies
  See Also:
    Create a policy properties

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AclPolicy()` |
    `AclPolicy​(JsonObject json)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `AclPolicy` | `addDatacenter​(String datacenter)` | Adds a datacenter, like `setDatacenters(List)`
    `List<String>` | `getDatacenters()` |
    `String` | `getDescription()` |
    `String` | `getId()` |
    `String` | `getName()` |
    `String` | `getNamespace()` |
    `String` | `getRules()` |
    `AclPolicy` | `setDatacenters​(List<String> datacenters)` | Sets an optional datacenters.
    `AclPolicy` | `setDescription​(String description)` | Sets an optional free-form description that is human-readable.
    `AclPolicy` | `setName​(String name)` | Sets a name.
    `AclPolicy` | `setNamespace​(String namespace)` | Sets an optional namespace.
    `AclPolicy` | `setRules​(String rules)` | Sets a rules.
    `JsonObject` | `toJson()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AclPolicy

          public AclPolicy()

    - #### AclPolicy

          public AclPolicy​(JsonObject json)

  - ### Method Detail

    - #### getName

          public String getName()

    - #### getDescription

          public String getDescription()

    - #### getRules

          public String getRules()

    - #### getDatacenters

          public List<String> getDatacenters()

    - #### getNamespace

          public String getNamespace()

    - #### getId

          public String getId()

    - #### toJson

          public JsonObject toJson()

    - #### setName

          public AclPolicy setName​(String name)

      Sets a name. Must be unique
      Parameters:
        `name` - can contain alphanumeric characters, dashes -, and underscores _
      See Also:
        `name`

    - #### setDescription

          public AclPolicy setDescription​(String description)

      Sets an optional free-form description that is human-readable.
      Parameters:
        `description` -
      See Also:
        `description`

    - #### setRules

          public AclPolicy setRules​(String rules)

      Sets a rules. The format of the Rules property is detailed in the ACL Rules documentation
      Parameters:
        `rules` - rules in specified format
      See Also:
        `rules`, ACL Rules documentation

    - #### setDatacenters

          public AclPolicy setDatacenters​(List<String> datacenters)

      Sets an optional datacenters. By default, the policy is valid in all datacenters
      Parameters:
        `datacenters` - list of datacenters
      See Also:
        `datacenters`

    - #### addDatacenter

          public AclPolicy addDatacenter​(String datacenter)

      Adds a datacenter, like `setDatacenters(List)`
      See Also:
        `datacenters`

    - #### setNamespace

          public AclPolicy setNamespace​(String namespace)

      Sets an optional namespace. Default value is ns URL query parameter or in the X-Consul-Namespace header, or 'default' namespace.
      Parameters:
        `namespace` -
      See Also:
        `namespace`