Share this page

# LrSqsClient.addPermission

Adds an SQS permission to the LrSqsClient's current queue.

`public static void addPermission(Collection<String> actionNames, Collection<String> awsAccountIds, String label)`

## Arguments

Name | Description
--- | ---
actionNames | Actions to be added.
awsAccountIds | IDs of the accounts to which to assign the permission.
label | Unique ID for the permission being set.

## Return values

This function does not return any values.

## General information

This API adds permissions specified in the actionNames argument to the accounts specified in the awsAccountIds argument. The new permission is identified by the given label.

## Example

Copy code

    public void permissions() {
            LrSqsClient.initClient(region, standardQueueUrl);

            LrSqsClient.addPermission
            (
                new ArrayList<String>() {{ add("SendMessage"); }},
                new ArrayList<String>() {{ add("123456789"); }},
                "MyPermission"
            );

            LrSqsClient.removePermission("MyPermission");

            LrSqsClient.closeClient();
        }

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: