getPolicyStore method

Future<GetPolicyStoreOutput> getPolicyStore({
  1. required String policyStoreId,
  2. bool? tags,
})

Retrieves details about a policy store.

May throw ResourceNotFoundException.

Parameter policyStoreId : Specifies the policy store that you want information about.

To specify a policy store, use its ID or alias name. When using an alias name, prefix it with policy-store-alias/. For example:

  • ID: PSEXAMPLEabcdefg111111
  • Alias name: policy-store-alias/example-policy-store
To view aliases, use ListPolicyStoreAliases.

Parameter tags : Specifies whether to return the tags that are attached to the policy store. If this parameter is included in the API call, the tags are returned, otherwise they are not returned.

Implementation

Future<GetPolicyStoreOutput> getPolicyStore({
  required String policyStoreId,
  bool? tags,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'VerifiedPermissions.GetPolicyStore'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'policyStoreId': policyStoreId,
      if (tags != null) 'tags': tags,
    },
  );

  return GetPolicyStoreOutput.fromJson(jsonResponse.body);
}