Interface ListKeysRequest.Builder

  • Method Details

    • limit

      Use this parameter to specify the maximum number of items to return. When this value is present, KMS does not return more than the specified number of items, but it might return fewer.

      This value is optional. If you include a value, it must be between 1 and 1000, inclusive. If you do not include a value, it defaults to 100.

      Parameters:
      limit - Use this parameter to specify the maximum number of items to return. When this value is present, KMS does not return more than the specified number of items, but it might return fewer.

      This value is optional. If you include a value, it must be between 1 and 1000, inclusive. If you do not include a value, it defaults to 100.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • marker

      Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextMarker from the truncated response you just received.

      Parameters:
      marker - Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextMarker from the truncated response you just received.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • resourceOwnersWithStrings

      ListKeysRequest.Builder resourceOwnersWithStrings(Collection<String> resourceOwners)

      Specifies whose KMS keys to list. Use this parameter to list KMS keys that other Amazon Web Services accounts shared with your Amazon Web Services account through Resource Access Manager (RAM).

      Specify one or two values. Valid values are:

      SELF

      Lists the KMS keys in your Amazon Web Services account and Region.

      OTHER_ACCOUNTS_VIA_RAM

      Lists the KMS keys in the Region that other Amazon Web Services accounts currently share with your Amazon Web Services account through RAM. This list doesn't include KMS keys that your Amazon Web Services account owns. For each of these KMS keys, the key ARN in the response contains the account ID of the Amazon Web Services account that owns the KMS key.

      If you omit this parameter, ListKeys lists only the KMS keys in your Amazon Web Services account. If you specify both values, in either order, ListKeys returns the KMS keys in your Amazon Web Services account first, and then the KMS keys that other Amazon Web Services accounts shared with you. A single response doesn't contain both kinds of KMS keys.

      When ResourceOwners includes OTHER_ACCOUNTS_VIA_RAM, a response can contain fewer KMS keys than the Limit value, or none, even when Truncated is true. To get all of the KMS keys, continue calling ListKeys with the NextMarker value from each response until Truncated is false. Use a NextMarker value only in a request that has the same ResourceOwners value as the request that returned it. Otherwise, the request can fail with an InvalidMarkerException.

      KMS keys that other Amazon Web Services accounts share with you can take some time to appear in or disappear from the results after changes to resource shares.

      Parameters:
      resourceOwners - Specifies whose KMS keys to list. Use this parameter to list KMS keys that other Amazon Web Services accounts shared with your Amazon Web Services account through Resource Access Manager (RAM).

      Specify one or two values. Valid values are:

      SELF

      Lists the KMS keys in your Amazon Web Services account and Region.

      OTHER_ACCOUNTS_VIA_RAM

      Lists the KMS keys in the Region that other Amazon Web Services accounts currently share with your Amazon Web Services account through RAM. This list doesn't include KMS keys that your Amazon Web Services account owns. For each of these KMS keys, the key ARN in the response contains the account ID of the Amazon Web Services account that owns the KMS key.

      If you omit this parameter, ListKeys lists only the KMS keys in your Amazon Web Services account. If you specify both values, in either order, ListKeys returns the KMS keys in your Amazon Web Services account first, and then the KMS keys that other Amazon Web Services accounts shared with you. A single response doesn't contain both kinds of KMS keys.

      When ResourceOwners includes OTHER_ACCOUNTS_VIA_RAM, a response can contain fewer KMS keys than the Limit value, or none, even when Truncated is true. To get all of the KMS keys, continue calling ListKeys with the NextMarker value from each response until Truncated is false. Use a NextMarker value only in a request that has the same ResourceOwners value as the request that returned it. Otherwise, the request can fail with an InvalidMarkerException.

      KMS keys that other Amazon Web Services accounts share with you can take some time to appear in or disappear from the results after changes to resource shares.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • resourceOwnersWithStrings

      ListKeysRequest.Builder resourceOwnersWithStrings(String... resourceOwners)

      Specifies whose KMS keys to list. Use this parameter to list KMS keys that other Amazon Web Services accounts shared with your Amazon Web Services account through Resource Access Manager (RAM).

      Specify one or two values. Valid values are:

      SELF

      Lists the KMS keys in your Amazon Web Services account and Region.

      OTHER_ACCOUNTS_VIA_RAM

      Lists the KMS keys in the Region that other Amazon Web Services accounts currently share with your Amazon Web Services account through RAM. This list doesn't include KMS keys that your Amazon Web Services account owns. For each of these KMS keys, the key ARN in the response contains the account ID of the Amazon Web Services account that owns the KMS key.

      If you omit this parameter, ListKeys lists only the KMS keys in your Amazon Web Services account. If you specify both values, in either order, ListKeys returns the KMS keys in your Amazon Web Services account first, and then the KMS keys that other Amazon Web Services accounts shared with you. A single response doesn't contain both kinds of KMS keys.

      When ResourceOwners includes OTHER_ACCOUNTS_VIA_RAM, a response can contain fewer KMS keys than the Limit value, or none, even when Truncated is true. To get all of the KMS keys, continue calling ListKeys with the NextMarker value from each response until Truncated is false. Use a NextMarker value only in a request that has the same ResourceOwners value as the request that returned it. Otherwise, the request can fail with an InvalidMarkerException.

      KMS keys that other Amazon Web Services accounts share with you can take some time to appear in or disappear from the results after changes to resource shares.

      Parameters:
      resourceOwners - Specifies whose KMS keys to list. Use this parameter to list KMS keys that other Amazon Web Services accounts shared with your Amazon Web Services account through Resource Access Manager (RAM).

      Specify one or two values. Valid values are:

      SELF

      Lists the KMS keys in your Amazon Web Services account and Region.

      OTHER_ACCOUNTS_VIA_RAM

      Lists the KMS keys in the Region that other Amazon Web Services accounts currently share with your Amazon Web Services account through RAM. This list doesn't include KMS keys that your Amazon Web Services account owns. For each of these KMS keys, the key ARN in the response contains the account ID of the Amazon Web Services account that owns the KMS key.

      If you omit this parameter, ListKeys lists only the KMS keys in your Amazon Web Services account. If you specify both values, in either order, ListKeys returns the KMS keys in your Amazon Web Services account first, and then the KMS keys that other Amazon Web Services accounts shared with you. A single response doesn't contain both kinds of KMS keys.

      When ResourceOwners includes OTHER_ACCOUNTS_VIA_RAM, a response can contain fewer KMS keys than the Limit value, or none, even when Truncated is true. To get all of the KMS keys, continue calling ListKeys with the NextMarker value from each response until Truncated is false. Use a NextMarker value only in a request that has the same ResourceOwners value as the request that returned it. Otherwise, the request can fail with an InvalidMarkerException.

      KMS keys that other Amazon Web Services accounts share with you can take some time to appear in or disappear from the results after changes to resource shares.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • resourceOwners

      ListKeysRequest.Builder resourceOwners(Collection<ResourceOwnerType> resourceOwners)

      Specifies whose KMS keys to list. Use this parameter to list KMS keys that other Amazon Web Services accounts shared with your Amazon Web Services account through Resource Access Manager (RAM).

      Specify one or two values. Valid values are:

      SELF

      Lists the KMS keys in your Amazon Web Services account and Region.

      OTHER_ACCOUNTS_VIA_RAM

      Lists the KMS keys in the Region that other Amazon Web Services accounts currently share with your Amazon Web Services account through RAM. This list doesn't include KMS keys that your Amazon Web Services account owns. For each of these KMS keys, the key ARN in the response contains the account ID of the Amazon Web Services account that owns the KMS key.

      If you omit this parameter, ListKeys lists only the KMS keys in your Amazon Web Services account. If you specify both values, in either order, ListKeys returns the KMS keys in your Amazon Web Services account first, and then the KMS keys that other Amazon Web Services accounts shared with you. A single response doesn't contain both kinds of KMS keys.

      When ResourceOwners includes OTHER_ACCOUNTS_VIA_RAM, a response can contain fewer KMS keys than the Limit value, or none, even when Truncated is true. To get all of the KMS keys, continue calling ListKeys with the NextMarker value from each response until Truncated is false. Use a NextMarker value only in a request that has the same ResourceOwners value as the request that returned it. Otherwise, the request can fail with an InvalidMarkerException.

      KMS keys that other Amazon Web Services accounts share with you can take some time to appear in or disappear from the results after changes to resource shares.

      Parameters:
      resourceOwners - Specifies whose KMS keys to list. Use this parameter to list KMS keys that other Amazon Web Services accounts shared with your Amazon Web Services account through Resource Access Manager (RAM).

      Specify one or two values. Valid values are:

      SELF

      Lists the KMS keys in your Amazon Web Services account and Region.

      OTHER_ACCOUNTS_VIA_RAM

      Lists the KMS keys in the Region that other Amazon Web Services accounts currently share with your Amazon Web Services account through RAM. This list doesn't include KMS keys that your Amazon Web Services account owns. For each of these KMS keys, the key ARN in the response contains the account ID of the Amazon Web Services account that owns the KMS key.

      If you omit this parameter, ListKeys lists only the KMS keys in your Amazon Web Services account. If you specify both values, in either order, ListKeys returns the KMS keys in your Amazon Web Services account first, and then the KMS keys that other Amazon Web Services accounts shared with you. A single response doesn't contain both kinds of KMS keys.

      When ResourceOwners includes OTHER_ACCOUNTS_VIA_RAM, a response can contain fewer KMS keys than the Limit value, or none, even when Truncated is true. To get all of the KMS keys, continue calling ListKeys with the NextMarker value from each response until Truncated is false. Use a NextMarker value only in a request that has the same ResourceOwners value as the request that returned it. Otherwise, the request can fail with an InvalidMarkerException.

      KMS keys that other Amazon Web Services accounts share with you can take some time to appear in or disappear from the results after changes to resource shares.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • resourceOwners

      ListKeysRequest.Builder resourceOwners(ResourceOwnerType... resourceOwners)

      Specifies whose KMS keys to list. Use this parameter to list KMS keys that other Amazon Web Services accounts shared with your Amazon Web Services account through Resource Access Manager (RAM).

      Specify one or two values. Valid values are:

      SELF

      Lists the KMS keys in your Amazon Web Services account and Region.

      OTHER_ACCOUNTS_VIA_RAM

      Lists the KMS keys in the Region that other Amazon Web Services accounts currently share with your Amazon Web Services account through RAM. This list doesn't include KMS keys that your Amazon Web Services account owns. For each of these KMS keys, the key ARN in the response contains the account ID of the Amazon Web Services account that owns the KMS key.

      If you omit this parameter, ListKeys lists only the KMS keys in your Amazon Web Services account. If you specify both values, in either order, ListKeys returns the KMS keys in your Amazon Web Services account first, and then the KMS keys that other Amazon Web Services accounts shared with you. A single response doesn't contain both kinds of KMS keys.

      When ResourceOwners includes OTHER_ACCOUNTS_VIA_RAM, a response can contain fewer KMS keys than the Limit value, or none, even when Truncated is true. To get all of the KMS keys, continue calling ListKeys with the NextMarker value from each response until Truncated is false. Use a NextMarker value only in a request that has the same ResourceOwners value as the request that returned it. Otherwise, the request can fail with an InvalidMarkerException.

      KMS keys that other Amazon Web Services accounts share with you can take some time to appear in or disappear from the results after changes to resource shares.

      Parameters:
      resourceOwners - Specifies whose KMS keys to list. Use this parameter to list KMS keys that other Amazon Web Services accounts shared with your Amazon Web Services account through Resource Access Manager (RAM).

      Specify one or two values. Valid values are:

      SELF

      Lists the KMS keys in your Amazon Web Services account and Region.

      OTHER_ACCOUNTS_VIA_RAM

      Lists the KMS keys in the Region that other Amazon Web Services accounts currently share with your Amazon Web Services account through RAM. This list doesn't include KMS keys that your Amazon Web Services account owns. For each of these KMS keys, the key ARN in the response contains the account ID of the Amazon Web Services account that owns the KMS key.

      If you omit this parameter, ListKeys lists only the KMS keys in your Amazon Web Services account. If you specify both values, in either order, ListKeys returns the KMS keys in your Amazon Web Services account first, and then the KMS keys that other Amazon Web Services accounts shared with you. A single response doesn't contain both kinds of KMS keys.

      When ResourceOwners includes OTHER_ACCOUNTS_VIA_RAM, a response can contain fewer KMS keys than the Limit value, or none, even when Truncated is true. To get all of the KMS keys, continue calling ListKeys with the NextMarker value from each response until Truncated is false. Use a NextMarker value only in a request that has the same ResourceOwners value as the request that returned it. Otherwise, the request can fail with an InvalidMarkerException.

      KMS keys that other Amazon Web Services accounts share with you can take some time to appear in or disappear from the results after changes to resource shares.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • overrideConfiguration

      ListKeysRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      overrideConfiguration - The override configuration.
      Returns:
      This object for method chaining.
    • overrideConfiguration

      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      builderConsumer - A Consumer to which an empty AwsRequestOverrideConfiguration.Builder will be given.
      Returns:
      This object for method chaining.