- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListAccessGrantsLocationsCommand
Returns a list of the locations registered in your S3 Access Grants instance.
- Permissions
-
You must have the
s3:ListAccessGrantsLocations
permission to use this operation.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { S3ControlClient, ListAccessGrantsLocationsCommand } from "@aws-sdk/client-s3-control"; // ES Modules import
// const { S3ControlClient, ListAccessGrantsLocationsCommand } = require("@aws-sdk/client-s3-control"); // CommonJS import
const client = new S3ControlClient(config);
const input = { // ListAccessGrantsLocationsRequest
AccountId: "STRING_VALUE",
NextToken: "STRING_VALUE",
MaxResults: Number("int"),
LocationScope: "STRING_VALUE",
};
const command = new ListAccessGrantsLocationsCommand(input);
const response = await client.send(command);
// { // ListAccessGrantsLocationsResult
// NextToken: "STRING_VALUE",
// AccessGrantsLocationsList: [ // AccessGrantsLocationsList
// { // ListAccessGrantsLocationsEntry
// CreatedAt: new Date("TIMESTAMP"),
// AccessGrantsLocationId: "STRING_VALUE",
// AccessGrantsLocationArn: "STRING_VALUE",
// LocationScope: "STRING_VALUE",
// IAMRoleArn: "STRING_VALUE",
// },
// ],
// };
ListAccessGrantsLocationsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
AccountId | string | undefined | The Amazon Web Services account ID of the S3 Access Grants instance. |
LocationScope | string | undefined | The S3 path to the location that you are registering. The location scope can be the default S3 location |
MaxResults | number | undefined | The maximum number of access grants that you would like returned in the |
NextToken | string | undefined | A pagination token to request the next page of results. Pass this value into a subsequent |
ListAccessGrantsLocationsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
AccessGrantsLocationsList | ListAccessGrantsLocationsEntry[] | undefined | A container for a list of registered locations in an S3 Access Grants instance. |
NextToken | string | undefined | A pagination token to request the next page of results. Pass this value into a subsequent |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
S3ControlServiceException | Base exception class for all service exceptions from S3Control service. |