스토리지 계정의 SAS 자격 증명을 나열합니다.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListAccountSas?api-version=2023-01-01
URI 매개 변수
Name |
In(다음 안에) |
필수 |
형식 |
Description |
accountName
|
path |
True
|
string
|
지정된 리소스 그룹 내의 스토리지 계정 이름입니다. Storage 계정 이름은 3자에서 24자 사이여야 하고 숫자 및 소문자만 사용해야 합니다.
Regex pattern: ^[a-z0-9]+$
|
resourceGroupName
|
path |
True
|
string
|
사용자의 구독 내에서 리소스 그룹의 이름입니다. 이름은 대소문자를 구분하지 않습니다.
Regex pattern: ^[-\w\._\(\)]+$
|
subscriptionId
|
path |
True
|
string
|
대상 구독의 ID입니다.
|
api-version
|
query |
True
|
string
|
이 작업에 사용할 API 버전입니다.
|
요청 본문
Name |
필수 |
형식 |
Description |
signedExpiry
|
True
|
string
|
공유 액세스 서명이 유효하지 않은 시간입니다.
|
signedPermission
|
True
|
Permissions
|
계정 SAS에 대한 서명된 권한입니다. 가능한 값은 읽기(r), 쓰기(w), 삭제(d), 목록(l), 추가(a), 만들기(c), 업데이트(u) 및 프로세스(p)입니다.
|
signedResourceTypes
|
True
|
SignedResourceTypes
|
계정 SAS를 사용하여 액세스할 수 있는 서명된 리소스 유형입니다. 서비스: 서비스 수준 API에 대한 액세스; 컨테이너(c): 컨테이너 수준 API에 대한 액세스; 개체(o): Blob, 큐 메시지, 테이블 엔터티 및 파일에 대한 개체 수준 API에 액세스합니다.
|
signedServices
|
True
|
Services
|
계정 SAS를 사용하여 액세스할 수 있는 서명된 서비스입니다. 가능한 값은 Blob(b), 큐(q), 테이블(t), 파일(f)입니다.
|
keyToSign
|
|
string
|
계정 SAS 토큰에 서명할 키입니다.
|
signedIp
|
|
string
|
요청을 수락할 IP 주소 또는 IP 주소 범위입니다.
|
signedProtocol
|
|
HttpProtocol
|
계정 SAS를 사용하여 수행한 요청에 허용되는 프로토콜입니다.
|
signedStart
|
|
string
|
SAS가 유효한 시간입니다.
|
응답
보안
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
사용자 계정 가장
|
예제
StorageAccountListAccountSAS
Sample Request
POST https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res7985/providers/Microsoft.Storage/storageAccounts/sto8588/ListAccountSas?api-version=2023-01-01
{
"signedServices": "b",
"signedResourceTypes": "s",
"signedPermission": "r",
"signedProtocol": "https,http",
"signedStart": "2017-05-24T10:42:03.1567373Z",
"signedExpiry": "2017-05-24T11:42:03.1567373Z",
"keyToSign": "key1"
}
import com.azure.resourcemanager.storage.models.AccountSasParameters;
import com.azure.resourcemanager.storage.models.HttpProtocol;
import com.azure.resourcemanager.storage.models.Permissions;
import com.azure.resourcemanager.storage.models.Services;
import com.azure.resourcemanager.storage.models.SignedResourceTypes;
import java.time.OffsetDateTime;
/** Samples for StorageAccounts ListAccountSas. */
public final class Main {
/*
* x-ms-original-file:
* specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountListAccountSAS.
* json
*/
/**
* Sample code: StorageAccountListAccountSAS.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void storageAccountListAccountSAS(com.azure.resourcemanager.AzureResourceManager azure) {
azure.storageAccounts().manager().serviceClient().getStorageAccounts().listAccountSasWithResponse("res7985",
"sto8588",
new AccountSasParameters().withServices(Services.B).withResourceTypes(SignedResourceTypes.S)
.withPermissions(Permissions.R).withProtocols(HttpProtocol.HTTPS_HTTP)
.withSharedAccessStartTime(OffsetDateTime.parse("2017-05-24T10:42:03.1567373Z"))
.withSharedAccessExpiryTime(OffsetDateTime.parse("2017-05-24T11:42:03.1567373Z"))
.withKeyToSign("fakeTokenPlaceholder"),
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_list_account_sas.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = StorageManagementClient(
credential=DefaultAzureCredential(),
subscription_id="{subscription-id}",
)
response = client.storage_accounts.list_account_sas(
resource_group_name="res7985",
account_name="sto8588",
parameters={
"keyToSign": "key1",
"signedExpiry": "2017-05-24T11:42:03.1567373Z",
"signedPermission": "r",
"signedProtocol": "https,http",
"signedResourceTypes": "s",
"signedServices": "b",
"signedStart": "2017-05-24T10:42:03.1567373Z",
},
)
print(response)
# x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountListAccountSAS.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"time"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0baf811c3c76c87b3c127d098519bd97141222dd/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountListAccountSAS.json
func ExampleAccountsClient_ListAccountSAS() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAccountsClient().ListAccountSAS(ctx, "res7985", "sto8588", armstorage.AccountSasParameters{
KeyToSign: to.Ptr("key1"),
SharedAccessExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T11:42:03.156Z"); return t }()),
Permissions: to.Ptr(armstorage.PermissionsR),
Protocols: to.Ptr(armstorage.HTTPProtocolHTTPSHTTP),
ResourceTypes: to.Ptr(armstorage.SignedResourceTypesS),
Services: to.Ptr(armstorage.ServicesB),
SharedAccessStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T10:42:03.156Z"); return t }()),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ListAccountSasResponse = armstorage.ListAccountSasResponse{
// AccountSasToken: to.Ptr("sv=2015-04-05&ss=b&srt=s&sp=r&st=2017-05-24T10%3A42%3A03Z&se=2017-05-24T11%3A42%3A03Z&spr=https,http&sig=Z0I%2BEpM%2BPPlTC8ApfUf%2BcffO2aahMgZim3U0iArqsS0%3D"),
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List SAS credentials of a storage account.
*
* @summary List SAS credentials of a storage account.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/examples/StorageAccountListAccountSAS.json
*/
async function storageAccountListAccountSas() {
const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7985";
const accountName = "sto8588";
const parameters = {
keyToSign: "key1",
sharedAccessExpiryTime: new Date("2017-05-24T11:42:03.1567373Z"),
permissions: "r",
protocols: "https,http",
resourceTypes: "s",
services: "b",
sharedAccessStartTime: new Date("2017-05-24T10:42:03.1567373Z"),
};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.listAccountSAS(
resourceGroupName,
accountName,
parameters
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"accountSasToken": "sv=2015-04-05&ss=b&srt=s&sp=r&st=2017-05-24T10%3A42%3A03Z&se=2017-05-24T11%3A42%3A03Z&spr=https,http&sig=Z0I%2BEpM%2BPPlTC8ApfUf%2BcffO2aahMgZim3U0iArqsS0%3D"
}
정의
Name |
Description |
AccountSasParameters
|
스토리지 계정의 SAS 자격 증명을 나열하는 매개 변수입니다.
|
HttpProtocol
|
계정 SAS를 사용하여 수행한 요청에 허용되는 프로토콜입니다.
|
ListAccountSasResponse
|
SAS 자격 증명 나열 작업 응답입니다.
|
Permissions
|
계정 SAS에 대한 서명된 권한입니다. 가능한 값은 읽기(r), 쓰기(w), 삭제(d), 목록(l), 추가(a), 만들기(c), 업데이트(u) 및 프로세스(p)입니다.
|
Services
|
계정 SAS를 사용하여 액세스할 수 있는 서명된 서비스입니다. 가능한 값은 Blob(b), 큐(q), 테이블(t), 파일(f)입니다.
|
SignedResourceTypes
|
계정 SAS를 사용하여 액세스할 수 있는 서명된 리소스 유형입니다. 서비스: 서비스 수준 API에 대한 액세스; 컨테이너(c): 컨테이너 수준 API에 대한 액세스; 개체(o): Blob, 큐 메시지, 테이블 엔터티 및 파일에 대한 개체 수준 API에 액세스합니다.
|
AccountSasParameters
스토리지 계정의 SAS 자격 증명을 나열하는 매개 변수입니다.
Name |
형식 |
Description |
keyToSign
|
string
|
계정 SAS 토큰에 서명할 키입니다.
|
signedExpiry
|
string
|
공유 액세스 서명이 유효하지 않은 시간입니다.
|
signedIp
|
string
|
요청을 수락할 IP 주소 또는 IP 주소 범위입니다.
|
signedPermission
|
Permissions
|
계정 SAS에 대한 서명된 권한입니다. 가능한 값은 읽기(r), 쓰기(w), 삭제(d), 목록(l), 추가(a), 만들기(c), 업데이트(u) 및 프로세스(p)입니다.
|
signedProtocol
|
HttpProtocol
|
계정 SAS를 사용하여 수행한 요청에 허용되는 프로토콜입니다.
|
signedResourceTypes
|
SignedResourceTypes
|
계정 SAS를 사용하여 액세스할 수 있는 서명된 리소스 유형입니다. 서비스: 서비스 수준 API에 대한 액세스; 컨테이너(c): 컨테이너 수준 API에 대한 액세스; 개체(o): Blob, 큐 메시지, 테이블 엔터티 및 파일에 대한 개체 수준 API에 액세스합니다.
|
signedServices
|
Services
|
계정 SAS를 사용하여 액세스할 수 있는 서명된 서비스입니다. 가능한 값은 Blob(b), 큐(q), 테이블(t), 파일(f)입니다.
|
signedStart
|
string
|
SAS가 유효한 시간입니다.
|
HttpProtocol
계정 SAS를 사용하여 수행한 요청에 허용되는 프로토콜입니다.
Name |
형식 |
Description |
https
|
string
|
|
https,http
|
string
|
|
ListAccountSasResponse
SAS 자격 증명 나열 작업 응답입니다.
Name |
형식 |
Description |
accountSasToken
|
string
|
스토리지 계정의 SAS 자격 증명을 나열합니다.
|
Permissions
계정 SAS에 대한 서명된 권한입니다. 가능한 값은 읽기(r), 쓰기(w), 삭제(d), 목록(l), 추가(a), 만들기(c), 업데이트(u) 및 프로세스(p)입니다.
Name |
형식 |
Description |
a
|
string
|
|
c
|
string
|
|
d
|
string
|
|
l
|
string
|
|
p
|
string
|
|
r
|
string
|
|
u
|
string
|
|
w
|
string
|
|
Services
계정 SAS를 사용하여 액세스할 수 있는 서명된 서비스입니다. 가능한 값은 Blob(b), 큐(q), 테이블(t), 파일(f)입니다.
Name |
형식 |
Description |
b
|
string
|
|
f
|
string
|
|
q
|
string
|
|
t
|
string
|
|
SignedResourceTypes
계정 SAS를 사용하여 액세스할 수 있는 서명된 리소스 유형입니다. 서비스: 서비스 수준 API에 대한 액세스; 컨테이너(c): 컨테이너 수준 API에 대한 액세스; 개체(o): Blob, 큐 메시지, 테이블 엔터티 및 파일에 대한 개체 수준 API에 액세스합니다.
Name |
형식 |
Description |
c
|
string
|
|
o
|
string
|
|
s
|
string
|
|