- 新しい順
- 投票が多い順
- コメントが多い順
Hello,
You can get this information from your existing file gateways by using the AWS CLI or any of the available AWS SDKs and wrapping the commands up in a script whos output you then capture in a text file. I'll show the steps I used to do this manually using the CLI ( https://docs.aws.amazon.com/cli/latest/reference/storagegateway/index.html ):
- Set up credentials for CLI access and preferred region.
- "aws storagegateway list-gateways" - This will give you the list of all your gateways activated in a given region. Your output will be similar to this:
{
"Gateways": [
{
"GatewayId": "sgw-xxxxxxxx",
"GatewayARN": "arn:aws:storagegateway:us-east-1:XXXXXXXXXXXX:gateway/sgw-xxxxxxxx",
"GatewayType": "FILE_S3",
"GatewayOperationalState": "ACTIVE",
"GatewayName": "IADtest",
"Ec2InstanceId": "i-xxxxxxxxxxxxxxxxx",
"Ec2InstanceRegion": "us-east-1"
}
]
}
- "aws storagegateway list-file-shares --gateway-arn arn:aws:storagegateway:us-east-1:XXXXXXXXXXXX:gateway/sgw-xxxxxxxx" - using the gateway arn from the previous step, you'll get a list of shares:
{
"FileShareInfoList": [
{
"FileShareType": "SMB",
"FileShareARN": "arn:aws:storagegateway:us-east-1:XXXXXXXXXXXX:share/share-xxxxxxxx",
"FileShareId": "share-xxxxxxxx",
"FileShareStatus": "AVAILABLE",
"GatewayARN": "arn:aws:storagegateway:us-east-1:XXXXXXXXXXXX:gateway/sgw-xxxxxxxx"
}
],
"Marker": null
}
- "aws storagegateway describe-smb-file-shares --file-share-arn-list arn:aws:storagegateway:us-east-1:XXXXXXXXXXXX:share/share-xxxxxxxx" - For each file share, you'll run this command including the FileShareARN from the previous step:
{
"SMBFileShareInfoList": [
{
"FileShareARN": "arn:aws:storagegateway:us-east-1:XXXXXXXXXXXX:share/share-xxxxxxxx",
"FileShareId": "share-xxxxxxxx",
"FileShareStatus": "AVAILABLE",
"GatewayARN": "arn:aws:storagegateway:us-east-1:XXXXXXXXXXXX:gateway/sgw-xxxxxxxx",
"KMSEncrypted": false,
"Path": "/iad-test-data",
"Role": "arn:aws:iam::XXXXXXXXXXXX:role/service-role/StorageGatewayBucketAccessRole27bcd82d-37f6-4f2f-94bd-xxxxxxxxxx",
"LocationARN": "arn:aws:s3:::iad-test-data",
"DefaultStorageClass": "S3_ONEZONE_IA",
"ObjectACL": "bucket-owner-full-control",
"ReadOnly": false,
"GuessMIMETypeEnabled": true,
"RequesterPays": false,
"SMBACLEnabled": false,
"AccessBasedEnumeration": false,
"AdminUserList": [],
"ValidUserList": [],
"InvalidUserList": [],
"AuditDestinationARN": "arn:aws:logs:us-east-1:XXXXXXXXXXXX:log-group:/aws/storagegateway/share-xxxxxxxx:*", "Authentication": "GuestAccess",
"CaseSensitivity": "ClientSpecified",
"Tags": [],
"FileShareName": "iad-test-data",
"NotificationPolicy": "{}"
}
]
}
If you have a lot of gateways and/or file shares, you can see that you would want to wrap up these commands in a script. Please feel free to ask any further questions you may have.
関連するコンテンツ
- AWS公式更新しました 2年前
- AWS公式更新しました 10ヶ月前