The create-access-point command is used to configure access points for a bucket.
Notes
An Alibaba Cloud account is automatically authorized to create access points. To create access points through a RAM user or Security Token Service (STS), you must possess the
oss:CreateAccessPoint
permission. For detailed instructions, see grant custom policy to a RAM user.Up to 1,000 access points can be created within an Alibaba Cloud account.
You can configure up to 100 access points for a bucket.
Syntax
ossutil api create-access-point --bucket value --create-access-point-configuration value [flags]
Parameter | Type | Description |
--bucket | string | The name of the bucket. |
--create-access-point-configuration | string | The container that stores the information about the access point. |
The create-access-point command corresponds to the CreateAccessPoint API operation. For more information about the parameters within, see CreateAccessPoint.
--create-access-point-configuration
The --create-access-point-configuration option supports both XML and JSON formats. If the value of the option contains the 'file://' prefix, configuration parameters are read from the specified file.
XML format:
<CreateAccessPointConfiguration> <VpcConfiguration> <VpcId>string</VpcId> </VpcConfiguration> <AccessPointName>string</AccessPointName> <NetworkOrigin>string</NetworkOrigin> </CreateAccessPointConfiguration>
JSON format:
{ "AccessPointName": "string", "NetworkOrigin": "string", "VpcConfiguration": { "VpcId": "string" } }
For more information about supported global command-line options, see Command-line options.
Example
The following code provides an example in which an access point named 'ap-01'
associated with examplebucket
is configured:
Create a configuration file named create-access-point-configuration.xml and add the following code:
<?xml version="1.0" encoding="UTF-8"?> <CreateAccessPointConfiguration> <AccessPointName>ap-01</AccessPointName> <NetworkOrigin>internet</NetworkOrigin> </CreateAccessPointConfiguration>
Sample command:
ossutil api create-access-point --bucket examplebucket --create-access-point-configuration file://create-access-point-configuration.xml
Create a configuration file named create-access-point-configuration.json and add the following code:
{ "AccessPointName": "ap-01", "NetworkOrigin": "internet" }
Sample command:
ossutil api create-access-point --bucket examplebucket --create-access-point-configuration file://create-access-monitor-configuration.json
Configure parameters in the following command in the JSON format:
ossutil api create-access-point --bucket examplebucket --create-access-point-configuration "{\"AccessPointName\":\"ap-01\",\"NetworkOrigin\":\"internet\"}"