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

NameDescription
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();
    }