Create an Amazon Web Services Storage Profile
Amazon Web Services
Storage ProfileTo create a storage profile, you make a POST request with a region ID associated with
a cloud account. The request body includes an
Amazon Web Services
fabric volume type. - Verify that all general prerequisites and prerequisites for theAutomation AssemblerInfrastructure as a Service (IaaS) service have been satisfied. See Prerequisites for API Use Case Examples.
- Verify that you have the cloud account ID for the new cloud account that you added. See Adding Cloud Accounts.
As an alternative to using the
storage-profiles
API call to create an Amazon Web Services
storage profile, you
can also use the storage-profiles-aws
API call. Optional procedure
steps show how to use the storage-profiles-aws
API call. The example
only includes the steps required to create an Amazon Web Services
storage profile using the
storage-profiles
API call.- Assign the cloud account ID variable.aws_cloud_account_id='<your_cloud_account_id>'
- Look up region IDs associated with the cloud account and in the external region IDus-east-1.curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $access_token" "$url/iaas/api/regions/?apiVersion=$api_version&"'$filter'"=externalRegionId%20eq%20'us-east-1'%20and%20cloudAccountId%20eq%20'"$aws_cloud_account_id"'" | jq "."
- Examine the response to find the ID for the region that you want.
- Assign the region ID variable.aws_region_id='<your_region_id>'
- List allAmazon Web Servicesfabric volume types.curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $access_token" "$url/iaas/api/fabric-aws-volume-types/?apiVersion=$api_version" | jq "."
- To select a volume type, examine the response.
- Create a storage profile for the selected region.curl -X POST \ $url/iaas/api/storage-profiles?apiVersion=$api_version \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $access_token" \ -d '{ "defaultItem": false, "supportsEncryption": false, "tags": [ { "key": "env", "value": "dev" } ], "diskProperties": { "deviceType": "ebs", "volumeType": "<volume_type_from_response>", "iops": "400" }, "regionId": "'$region_id'", "name": "<your-aws-storage-profile>", "description": "Example AWS storage profile" }' | jq "."
- Create a storage profile for the selected region using thestorage-profiles-awsAPI call.curl -X POST \ $url/iaas/api/storage-profiles-aws?apiVersion=$api_version \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $access_token" \ -d '{ "defaultItem": false, "supportsEncryption": false, "tags": [ { "key": "env", "value": "dev" } ] "deviceType": "ebs", "volumeType": "<volume_type_from_response>", "iops": "1000", "regionId": "'$region_id'", "name": "<your-aws-storage-profile>", "description": "Example AWS storage profile" }' | jq "."
- To obtain the storage profile ID, examine the response.
- Assign the storage profile ID variable.aws_storage_profile_id='<your_storage_profile_id>'
- Look up the storage profile you created with your storage profile ID.curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $access_token" $url/iaas/api/storage-profiles/$aws_storage_profile_id?apiVersion=$api_version | jq "."The response shows the name and ID for the storage profile you created.Using the external region ID and the cloud account ID, you can also filter for the storage profile with a query that does not require the storage profile ID. See Filtering Resources by Region ID.
- List all storage profiles using thestorage-profiles-awsAPI call.curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $access_token" $url/iaas/api/storage-profiles-aws?apiVersion=$api_version | jq "."
- Delete anAmazon Web Servicesstorage profile. Alternatively, you can use thestorage-profiles-awsAPI call.curl -X DELETE -H 'Content-Type: application/json' -H "Authorization: Bearer $access_token" $url/iaas/api/storage-profiles/$aws_storage_profile_id?apiVersion=$api_version | jq "."
Create an
Amazon Web Services
storage
profileAssign the required variables including
the cloud account ID for an
Amazon Web Services
cloud account.$ url='https://appliance.domain.com' $ api_version='2021-07-15' $ aws_cloud_account_id='c8c3c9bfdb449475-7f703c5265a63d87-5fa34c478df36b060e1ca3551254c403301 3bf3283908e4661cd1c6fb2f8b9ae-ce5aad01092b47558644f6b6615d'
Look up region IDs associated with the
cloud account and in the external region ID
us-east-1
.$ curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $access_token" "$url/iaas/api/regions/?apiVersion=$api_version&"'$filter'"=externalRegionId%20eq%20'us-east-1'%20and%20cloudAccountId%20eq%20'"$aws_cloud_account_id"'" | jq "."
A snippet of the response shows the
region ID.
... "externalRegionId": "us-east-1", "cloudAccountId": "c8c3c9bfdb449475-7f703c5265a63d87-5fa34c478df36b060e1ca3551254c4033013bf3283908e4661cd1c6fb2f8b9ae-ce5aad01092b47558644f6b6615d", "id": "37d6c1acf4a8275586468873c739", "updatedAt": "2022-04-02", ...
Assign the
Amazon Web Services
region ID.$ aws_region_id='37d6c1acf4a8275586468873c739'
List all
Amazon Web Services
fabric volume types.$ curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $access_token" "$url/iaas/api/fabric-aws-volume-types/?apiVersion=$api_version" | jq "."
A snippet of the response shows the
volume types.
... { "volumeTypes": [ "standard", "io1", "gp2", "sc1", "st1" ] }, ...
Select volume type and create an AWS
storage profile named
aws-storage-profile
.$ curl -X POST \ $url/iaas/api/storage-profiles?apiVersion=$api_version \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $access_token" \ -d '{ "defaultItem": false, "supportsEncryption": false, "tags": [ { "key": "env", "value": "dev" } ], "diskProperties": { "deviceType": "ebs", "volumeType": "io1", "iops": "400" }, "regionId": "'$aws_region_id'", "name": "aws-storage-profile", "description": "Example AWS storage profile" "regionId":"'$aws_region_id'" }' | jq "."
A snippet of the response shows the
storage profile ID.
... "externalRegionId": "us-east-1", "name": "aws-storage-profile", "description": "Example AWS storage profile", "id": "3e3dc378-a090-4b7e-af41-57b1735d9526", "createdAt": "2022-04-02", "updatedAt": "2022-04-02", ...