putAuthPolicy method

Future<PutAuthPolicyResponse> putAuthPolicy({
  1. required String policy,
  2. required String resourceIdentifier,
})

Creates or updates the auth policy. The policy string in JSON must not contain newlines or blank lines.

For more information, see Auth policies in the Amazon VPC Lattice User Guide.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter policy : The auth policy. The policy string in JSON must not contain newlines or blank lines.

Parameter resourceIdentifier : The ID or ARN of the service network or service for which the policy is created.

Implementation

Future<PutAuthPolicyResponse> putAuthPolicy({
  required String policy,
  required String resourceIdentifier,
}) async {
  final $payload = <String, dynamic>{
    'policy': policy,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/authpolicy/${Uri.encodeComponent(resourceIdentifier)}',
    exceptionFnMap: _exceptionFns,
  );
  return PutAuthPolicyResponse.fromJson(response);
}