putAccessPointPolicyForObjectLambda method

Future<void> putAccessPointPolicyForObjectLambda({
  1. required String accountId,
  2. required String name,
  3. required String policy,
})
Creates or replaces resource policy for an Object Lambda Access Point. For an example policy, see Creating Object Lambda Access Points in the Amazon S3 User Guide.

The following actions are related to PutAccessPointPolicyForObjectLambda:

Parameter accountId : The account ID for the account that owns the specified Object Lambda Access Point.

Parameter name : The name of the Object Lambda Access Point.

Parameter policy : Object Lambda Access Point resource policy document.

Implementation

Future<void> putAccessPointPolicyForObjectLambda({
  required String accountId,
  required String name,
  required String policy,
}) async {
  final headers = <String, String>{
    'x-amz-account-id': accountId.toString(),
  };
  await _protocol.send(
    method: 'PUT',
    requestUri:
        '/v20180820/accesspointforobjectlambda/${Uri.encodeComponent(name)}/policy',
    headers: headers,
    payload: PutAccessPointPolicyForObjectLambdaRequest(
            accountId: accountId, name: name, policy: policy)
        .toXml('PutAccessPointPolicyForObjectLambdaRequest'),
    endpoint: _resolveEndpoint(
      requiresAccountId: true,
      accountId: accountId,
    ),
    hostPrefix: '{AccountId}.',
    exceptionFnMap: _exceptionFns,
  );
}