diff --git a/sdk/storage/arm-storage/src/models/blobContainersMappers.ts b/sdk/storage/arm-storage/src/models/blobContainersMappers.ts index 2922e9f1ccfa..e9be51211373 100644 --- a/sdk/storage/arm-storage/src/models/blobContainersMappers.ts +++ b/sdk/storage/arm-storage/src/models/blobContainersMappers.ts @@ -50,6 +50,7 @@ export { LegalHoldProperties, ListContainerItem, ListContainerItems, + ListQueue, ManagementPolicy, ManagementPolicyAction, ManagementPolicyBaseBlob, @@ -67,6 +68,7 @@ export { PrivateLinkResource, PrivateLinkServiceConnectionState, ProxyResource, + QueueServiceProperties, Resource, RestorePolicyProperties, RoutingPreference, @@ -74,6 +76,9 @@ export { StorageAccount, StorageAccountInternetEndpoints, StorageAccountMicrosoftEndpoints, + StorageQueue, + Table, + TableServiceProperties, TagFilter, TagProperty, TrackedResource, diff --git a/sdk/storage/arm-storage/src/models/blobServicesMappers.ts b/sdk/storage/arm-storage/src/models/blobServicesMappers.ts index 5ea05717ecf4..a73ad045e24d 100644 --- a/sdk/storage/arm-storage/src/models/blobServicesMappers.ts +++ b/sdk/storage/arm-storage/src/models/blobServicesMappers.ts @@ -42,6 +42,7 @@ export { KeyVaultProperties, LegalHoldProperties, ListContainerItem, + ListQueue, ManagementPolicy, ManagementPolicyAction, ManagementPolicyBaseBlob, @@ -59,6 +60,7 @@ export { PrivateLinkResource, PrivateLinkServiceConnectionState, ProxyResource, + QueueServiceProperties, Resource, RestorePolicyProperties, RoutingPreference, @@ -66,6 +68,9 @@ export { StorageAccount, StorageAccountInternetEndpoints, StorageAccountMicrosoftEndpoints, + StorageQueue, + Table, + TableServiceProperties, TagFilter, TagProperty, TrackedResource, diff --git a/sdk/storage/arm-storage/src/models/encryptionScopesMappers.ts b/sdk/storage/arm-storage/src/models/encryptionScopesMappers.ts index 784718605cc2..c2d72ad693e3 100644 --- a/sdk/storage/arm-storage/src/models/encryptionScopesMappers.ts +++ b/sdk/storage/arm-storage/src/models/encryptionScopesMappers.ts @@ -43,6 +43,7 @@ export { KeyVaultProperties, LegalHoldProperties, ListContainerItem, + ListQueue, ManagementPolicy, ManagementPolicyAction, ManagementPolicyBaseBlob, @@ -60,6 +61,7 @@ export { PrivateLinkResource, PrivateLinkServiceConnectionState, ProxyResource, + QueueServiceProperties, Resource, RestorePolicyProperties, RoutingPreference, @@ -67,6 +69,9 @@ export { StorageAccount, StorageAccountInternetEndpoints, StorageAccountMicrosoftEndpoints, + StorageQueue, + Table, + TableServiceProperties, TagFilter, TagProperty, TrackedResource, diff --git a/sdk/storage/arm-storage/src/models/fileServicesMappers.ts b/sdk/storage/arm-storage/src/models/fileServicesMappers.ts index 44f22a1df678..fd3c6a18d04a 100644 --- a/sdk/storage/arm-storage/src/models/fileServicesMappers.ts +++ b/sdk/storage/arm-storage/src/models/fileServicesMappers.ts @@ -42,6 +42,7 @@ export { KeyVaultProperties, LegalHoldProperties, ListContainerItem, + ListQueue, ManagementPolicy, ManagementPolicyAction, ManagementPolicyBaseBlob, @@ -59,6 +60,7 @@ export { PrivateLinkResource, PrivateLinkServiceConnectionState, ProxyResource, + QueueServiceProperties, Resource, RestorePolicyProperties, RoutingPreference, @@ -66,6 +68,9 @@ export { StorageAccount, StorageAccountInternetEndpoints, StorageAccountMicrosoftEndpoints, + StorageQueue, + Table, + TableServiceProperties, TagFilter, TagProperty, TrackedResource, diff --git a/sdk/storage/arm-storage/src/models/fileSharesMappers.ts b/sdk/storage/arm-storage/src/models/fileSharesMappers.ts index 6e6d768545d4..f59a1544518c 100644 --- a/sdk/storage/arm-storage/src/models/fileSharesMappers.ts +++ b/sdk/storage/arm-storage/src/models/fileSharesMappers.ts @@ -43,6 +43,7 @@ export { KeyVaultProperties, LegalHoldProperties, ListContainerItem, + ListQueue, ManagementPolicy, ManagementPolicyAction, ManagementPolicyBaseBlob, @@ -60,6 +61,7 @@ export { PrivateLinkResource, PrivateLinkServiceConnectionState, ProxyResource, + QueueServiceProperties, Resource, RestorePolicyProperties, RoutingPreference, @@ -67,6 +69,9 @@ export { StorageAccount, StorageAccountInternetEndpoints, StorageAccountMicrosoftEndpoints, + StorageQueue, + Table, + TableServiceProperties, TagFilter, TagProperty, TrackedResource, diff --git a/sdk/storage/arm-storage/src/models/index.ts b/sdk/storage/arm-storage/src/models/index.ts index 2f61c31b879c..93db8792d31e 100644 --- a/sdk/storage/arm-storage/src/models/index.ts +++ b/sdk/storage/arm-storage/src/models/index.ts @@ -342,6 +342,11 @@ export interface Encryption { * Default value: 'Microsoft.Storage'. */ keySource: KeySource; + /** + * A boolean indicating whether or not the service applies a secondary layer of encryption with + * platform managed keys for data at rest. + */ + requireInfrastructureEncryption?: boolean; /** * Properties provided by key vault. */ @@ -576,6 +581,16 @@ export interface StorageAccountCreateParameters { * Maintains information about the network routing choice opted by the user for data transfer */ routingPreference?: RoutingPreference; + /** + * Allow or disallow public access to all blobs or containers in the storage account. The default + * interpretation is true for this property. + */ + allowBlobPublicAccess?: boolean; + /** + * Set the minimum TLS version to be permitted on requests to storage. The default interpretation + * is TLS 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2' + */ + minimumTlsVersion?: MinimumTlsVersion; } /** @@ -996,6 +1011,16 @@ export interface StorageAccount extends TrackedResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly blobRestoreStatus?: BlobRestoreStatus; + /** + * Allow or disallow public access to all blobs or containers in the storage account. The default + * interpretation is true for this property. + */ + allowBlobPublicAccess?: boolean; + /** + * Set the minimum TLS version to be permitted on requests to storage. The default interpretation + * is TLS 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2' + */ + minimumTlsVersion?: MinimumTlsVersion; } /** @@ -1098,6 +1123,16 @@ export interface StorageAccountUpdateParameters { * Maintains information about the network routing choice opted by the user for data transfer */ routingPreference?: RoutingPreference; + /** + * Allow or disallow public access to all blobs or containers in the storage account. The default + * interpretation is true for this property. + */ + allowBlobPublicAccess?: boolean; + /** + * Set the minimum TLS version to be permitted on requests to storage. The default interpretation + * is TLS 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2' + */ + minimumTlsVersion?: MinimumTlsVersion; /** * Optional. Indicates the type of storage account. Currently only StorageV2 value supported by * server. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', @@ -1462,36 +1497,6 @@ export interface ManagementPolicy extends Resource { policy: ManagementPolicySchema; } -/** - * A private link resource - */ -export interface PrivateLinkResource extends Resource { - /** - * The private link resource group id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly groupId?: string; - /** - * The private link resource required member names. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly requiredMembers?: string[]; - /** - * The private link resource Private link DNS zone name. - */ - requiredZoneNames?: string[]; -} - -/** - * A list of private link resources - */ -export interface PrivateLinkResourceListResult { - /** - * Array of private link resources - */ - value?: PrivateLinkResource[]; -} - /** * The key vault properties for the encryption scope. This is a required field if encryption scope * 'source' attribute is set to 'Microsoft.KeyVault'. @@ -1639,6 +1644,36 @@ export interface AzureEntityResource extends Resource { readonly etag?: string; } +/** + * A private link resource + */ +export interface PrivateLinkResource extends Resource { + /** + * The private link resource group id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupId?: string; + /** + * The private link resource required member names. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredMembers?: string[]; + /** + * The private link resource Private link DNS zone name. + */ + requiredZoneNames?: string[]; +} + +/** + * A list of private link resources + */ +export interface PrivateLinkResourceListResult { + /** + * Array of private link resources + */ + value?: PrivateLinkResource[]; +} + /** * An update history of the ImmutabilityPolicy of a blob container. */ @@ -1762,6 +1797,26 @@ export interface LegalHoldProperties { * Properties of the blob container, including Id, resource name, resource type, Etag. */ export interface BlobContainer extends AzureEntityResource { + /** + * The version of the deleted blob container. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly version?: string; + /** + * Indicates whether the blob container was deleted. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly deleted?: boolean; + /** + * Blob container deletion time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly deletedTime?: Date; + /** + * Remaining retention days for soft deleted blob container. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly remainingRetentionDays?: number; /** * Default the container to use specified encryption scope for all writes. */ @@ -1874,6 +1929,26 @@ export interface LegalHold { * The blob container properties be listed out. */ export interface ListContainerItem extends AzureEntityResource { + /** + * The version of the deleted blob container. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly version?: string; + /** + * Indicates whether the blob container was deleted. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly deleted?: boolean; + /** + * Blob container deletion time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly deletedTime?: Date; + /** + * Remaining retention days for soft deleted blob container. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly remainingRetentionDays?: number; /** * Default the container to use specified encryption scope for all writes. */ @@ -2306,6 +2381,89 @@ export interface FileShareItem extends AzureEntityResource { readonly shareUsageBytes?: number; } +/** + * The properties of a storage account’s Queue service. + */ +export interface QueueServiceProperties extends Resource { + /** + * Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in + * the request. If no CorsRule elements are included in the request body, all CORS rules will be + * deleted, and CORS will be disabled for the Queue service. + */ + cors?: CorsRules; +} + +/** + * An interface representing ListQueueServices. + */ +export interface ListQueueServices { + /** + * List of queue services returned. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: QueueServiceProperties[]; +} + +/** + * An interface representing StorageQueue. + */ +export interface StorageQueue extends Resource { + /** + * A name-value pair that represents queue metadata. + */ + metadata?: { [propertyName: string]: string }; + /** + * Integer indicating an approximate number of messages in the queue. This number is not lower + * than the actual number of messages in the queue, but could be higher. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly approximateMessageCount?: number; +} + +/** + * An interface representing ListQueue. + */ +export interface ListQueue extends Resource { + /** + * A name-value pair that represents queue metadata. + */ + metadata?: { [propertyName: string]: string }; +} + +/** + * The properties of a storage account’s Table service. + */ +export interface TableServiceProperties extends Resource { + /** + * Specifies CORS rules for the Table service. You can include up to five CorsRule elements in + * the request. If no CorsRule elements are included in the request body, all CORS rules will be + * deleted, and CORS will be disabled for the Table service. + */ + cors?: CorsRules; +} + +/** + * An interface representing ListTableServices. + */ +export interface ListTableServices { + /** + * List of table services returned. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: TableServiceProperties[]; +} + +/** + * Properties of the table, including Id, resource name, resource type. + */ +export interface Table extends Resource { + /** + * Table name under the specified account + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tableName?: string; +} + /** * Optional Parameters. */ @@ -2341,6 +2499,11 @@ export interface BlobContainersListOptionalParams extends msRest.RequestOptionsB * Optional. When specified, only container names starting with the filter will be listed. */ filter?: string; + /** + * Optional, used to include the properties for soft deleted blob containers. Possible values + * include: 'deleted' + */ + include?: ListContainersInclude; } /** @@ -2451,6 +2614,65 @@ export interface FileSharesGetOptionalParams extends msRest.RequestOptionsBase { expand?: GetShareExpand; } +/** + * Optional Parameters. + */ +export interface QueueServicesSetServicePropertiesOptionalParams extends msRest.RequestOptionsBase { + /** + * Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in + * the request. If no CorsRule elements are included in the request body, all CORS rules will be + * deleted, and CORS will be disabled for the Queue service. + */ + cors?: CorsRules; +} + +/** + * Optional Parameters. + */ +export interface QueueCreateOptionalParams extends msRest.RequestOptionsBase { + /** + * A name-value pair that represents queue metadata. + */ + metadata?: { [propertyName: string]: string }; +} + +/** + * Optional Parameters. + */ +export interface QueueUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * A name-value pair that represents queue metadata. + */ + metadata?: { [propertyName: string]: string }; +} + +/** + * Optional Parameters. + */ +export interface QueueListOptionalParams extends msRest.RequestOptionsBase { + /** + * Optional, a maximum number of queues that should be included in a list queue response + */ + maxpagesize?: string; + /** + * Optional, When specified, only the queues with a name starting with the given filter will be + * listed. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface TableServicesSetServicePropertiesOptionalParams extends msRest.RequestOptionsBase { + /** + * Specifies CORS rules for the Table service. You can include up to five CorsRule elements in + * the request. If no CorsRule elements are included in the request body, all CORS rules will be + * deleted, and CORS will be disabled for the Table service. + */ + cors?: CorsRules; +} + /** * An interface representing StorageManagementClientOptions. */ @@ -2626,6 +2848,32 @@ export interface FileShareItems extends Array { readonly nextLink?: string; } +/** + * @interface + * Response schema. Contains list of queues returned + * @extends Array + */ +export interface ListQueueResource extends Array { + /** + * Request URL that can be used to list next page of queues + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Response schema. Contains list of tables returned + * @extends Array + */ +export interface ListTableResource extends Array
{ + /** + * Request URL that can be used to query next page of tables + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + /** * Defines values for ReasonCode. * Possible values include: 'QuotaId', 'NotAvailableForSubscription' @@ -2749,6 +2997,14 @@ export type LargeFileSharesState = 'Disabled' | 'Enabled'; */ export type RoutingChoice = 'MicrosoftRouting' | 'InternetRouting'; +/** + * Defines values for MinimumTlsVersion. + * Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2' + * @readonly + * @enum {string} + */ +export type MinimumTlsVersion = 'TLS1_0' | 'TLS1_1' | 'TLS1_2'; + /** * Defines values for GeoReplicationStatus. * Possible values include: 'Live', 'Bootstrap', 'Unavailable' @@ -2958,6 +3214,14 @@ export type StorageAccountExpand = 'geoReplicationStats' | 'blobRestoreStatus'; */ export type ListKeyExpand = 'kerb'; +/** + * Defines values for ListContainersInclude. + * Possible values include: 'deleted' + * @readonly + * @enum {string} + */ +export type ListContainersInclude = 'deleted'; + /** * Defines values for ListSharesExpand. * Possible values include: 'deleted' @@ -4106,3 +4370,323 @@ export type FileSharesListNextResponse = FileShareItems & { parsedBody: FileShareItems; }; }; + +/** + * Contains response data for the list operation. + */ +export type QueueServicesListResponse = ListQueueServices & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListQueueServices; + }; +}; + +/** + * Contains response data for the setServiceProperties operation. + */ +export type QueueServicesSetServicePropertiesResponse = QueueServiceProperties & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: QueueServiceProperties; + }; +}; + +/** + * Contains response data for the getServiceProperties operation. + */ +export type QueueServicesGetServicePropertiesResponse = QueueServiceProperties & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: QueueServiceProperties; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type QueueCreateResponse = StorageQueue & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: StorageQueue; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type QueueUpdateResponse = StorageQueue & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: StorageQueue; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type QueueGetResponse = StorageQueue & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: StorageQueue; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type QueueListResponse = ListQueueResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListQueueResource; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type QueueListNextResponse = ListQueueResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListQueueResource; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type TableServicesListResponse = ListTableServices & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListTableServices; + }; +}; + +/** + * Contains response data for the setServiceProperties operation. + */ +export type TableServicesSetServicePropertiesResponse = TableServiceProperties & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TableServiceProperties; + }; +}; + +/** + * Contains response data for the getServiceProperties operation. + */ +export type TableServicesGetServicePropertiesResponse = TableServiceProperties & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TableServiceProperties; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type TableCreateResponse = Table & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Table; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type TableUpdateResponse = Table & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Table; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type TableGetResponse = Table & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Table; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type TableListResponse = ListTableResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListTableResource; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type TableListNextResponse = ListTableResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListTableResource; + }; +}; diff --git a/sdk/storage/arm-storage/src/models/managementPoliciesMappers.ts b/sdk/storage/arm-storage/src/models/managementPoliciesMappers.ts index b2869eb2eeb7..10328e912851 100644 --- a/sdk/storage/arm-storage/src/models/managementPoliciesMappers.ts +++ b/sdk/storage/arm-storage/src/models/managementPoliciesMappers.ts @@ -41,6 +41,7 @@ export { KeyVaultProperties, LegalHoldProperties, ListContainerItem, + ListQueue, ManagementPolicy, ManagementPolicyAction, ManagementPolicyBaseBlob, @@ -58,6 +59,7 @@ export { PrivateLinkResource, PrivateLinkServiceConnectionState, ProxyResource, + QueueServiceProperties, Resource, RestorePolicyProperties, RoutingPreference, @@ -65,6 +67,9 @@ export { StorageAccount, StorageAccountInternetEndpoints, StorageAccountMicrosoftEndpoints, + StorageQueue, + Table, + TableServiceProperties, TagFilter, TagProperty, TrackedResource, diff --git a/sdk/storage/arm-storage/src/models/mappers.ts b/sdk/storage/arm-storage/src/models/mappers.ts index 4eb901d1b842..58d4aae4798b 100644 --- a/sdk/storage/arm-storage/src/models/mappers.ts +++ b/sdk/storage/arm-storage/src/models/mappers.ts @@ -547,6 +547,12 @@ export const Encryption: msRest.CompositeMapper = { name: "String" } }, + requireInfrastructureEncryption: { + serializedName: "requireInfrastructureEncryption", + type: { + name: "Boolean" + } + }, keyVaultProperties: { serializedName: "keyvaultproperties", type: { @@ -950,6 +956,18 @@ export const StorageAccountCreateParameters: msRest.CompositeMapper = { name: "Composite", className: "RoutingPreference" } + }, + allowBlobPublicAccess: { + serializedName: "properties.allowBlobPublicAccess", + type: { + name: "Boolean" + } + }, + minimumTlsVersion: { + serializedName: "properties.minimumTlsVersion", + type: { + name: "String" + } } } } @@ -1581,6 +1599,18 @@ export const StorageAccount: msRest.CompositeMapper = { name: "Composite", className: "BlobRestoreStatus" } + }, + allowBlobPublicAccess: { + serializedName: "properties.allowBlobPublicAccess", + type: { + name: "Boolean" + } + }, + minimumTlsVersion: { + serializedName: "properties.minimumTlsVersion", + type: { + name: "String" + } } } } @@ -1749,6 +1779,18 @@ export const StorageAccountUpdateParameters: msRest.CompositeMapper = { className: "RoutingPreference" } }, + allowBlobPublicAccess: { + serializedName: "properties.allowBlobPublicAccess", + type: { + name: "Boolean" + } + }, + minimumTlsVersion: { + serializedName: "properties.minimumTlsVersion", + type: { + name: "String" + } + }, kind: { serializedName: "kind", type: { @@ -2368,69 +2410,6 @@ export const ManagementPolicy: msRest.CompositeMapper = { } }; -export const PrivateLinkResource: msRest.CompositeMapper = { - serializedName: "PrivateLinkResource", - type: { - name: "Composite", - className: "PrivateLinkResource", - modelProperties: { - ...Resource.type.modelProperties, - groupId: { - readOnly: true, - serializedName: "properties.groupId", - type: { - name: "String" - } - }, - requiredMembers: { - readOnly: true, - serializedName: "properties.requiredMembers", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - requiredZoneNames: { - serializedName: "properties.requiredZoneNames", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const PrivateLinkResourceListResult: msRest.CompositeMapper = { - serializedName: "PrivateLinkResourceListResult", - type: { - name: "Composite", - className: "PrivateLinkResourceListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateLinkResource" - } - } - } - } - } - } -}; - export const EncryptionScopeKeyVaultProperties: msRest.CompositeMapper = { serializedName: "EncryptionScopeKeyVaultProperties", type: { @@ -2657,6 +2636,69 @@ export const AzureEntityResource: msRest.CompositeMapper = { } }; +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...Resource.type.modelProperties, + groupId: { + readOnly: true, + serializedName: "properties.groupId", + type: { + name: "String" + } + }, + requiredMembers: { + readOnly: true, + serializedName: "properties.requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateLinkResourceListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceListResult", + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + } + } + } +}; + export const UpdateHistoryProperty: msRest.CompositeMapper = { serializedName: "UpdateHistoryProperty", type: { @@ -2839,6 +2881,34 @@ export const BlobContainer: msRest.CompositeMapper = { className: "BlobContainer", modelProperties: { ...AzureEntityResource.type.modelProperties, + version: { + readOnly: true, + serializedName: "properties.version", + type: { + name: "String" + } + }, + deleted: { + readOnly: true, + serializedName: "properties.deleted", + type: { + name: "Boolean" + } + }, + deletedTime: { + readOnly: true, + serializedName: "properties.deletedTime", + type: { + name: "DateTime" + } + }, + remainingRetentionDays: { + readOnly: true, + serializedName: "properties.remainingRetentionDays", + type: { + name: "Number" + } + }, defaultEncryptionScope: { serializedName: "properties.defaultEncryptionScope", type: { @@ -3001,6 +3071,34 @@ export const ListContainerItem: msRest.CompositeMapper = { className: "ListContainerItem", modelProperties: { ...AzureEntityResource.type.modelProperties, + version: { + readOnly: true, + serializedName: "properties.version", + type: { + name: "String" + } + }, + deleted: { + readOnly: true, + serializedName: "properties.deleted", + type: { + name: "Boolean" + } + }, + deletedTime: { + readOnly: true, + serializedName: "properties.deletedTime", + type: { + name: "DateTime" + } + }, + remainingRetentionDays: { + readOnly: true, + serializedName: "properties.remainingRetentionDays", + type: { + name: "Number" + } + }, defaultEncryptionScope: { serializedName: "properties.defaultEncryptionScope", type: { @@ -3687,6 +3785,157 @@ export const FileShareItem: msRest.CompositeMapper = { } }; +export const QueueServiceProperties: msRest.CompositeMapper = { + serializedName: "QueueServiceProperties", + type: { + name: "Composite", + className: "QueueServiceProperties", + modelProperties: { + ...Resource.type.modelProperties, + cors: { + serializedName: "properties.cors", + type: { + name: "Composite", + className: "CorsRules" + } + } + } + } +}; + +export const ListQueueServices: msRest.CompositeMapper = { + serializedName: "ListQueueServices", + type: { + name: "Composite", + className: "ListQueueServices", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "QueueServiceProperties" + } + } + } + } + } + } +}; + +export const StorageQueue: msRest.CompositeMapper = { + serializedName: "StorageQueue", + type: { + name: "Composite", + className: "StorageQueue", + modelProperties: { + ...Resource.type.modelProperties, + metadata: { + serializedName: "properties.metadata", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + approximateMessageCount: { + readOnly: true, + serializedName: "properties.approximateMessageCount", + type: { + name: "Number" + } + } + } + } +}; + +export const ListQueue: msRest.CompositeMapper = { + serializedName: "ListQueue", + type: { + name: "Composite", + className: "ListQueue", + modelProperties: { + ...Resource.type.modelProperties, + metadata: { + serializedName: "properties.metadata", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const TableServiceProperties: msRest.CompositeMapper = { + serializedName: "TableServiceProperties", + type: { + name: "Composite", + className: "TableServiceProperties", + modelProperties: { + ...Resource.type.modelProperties, + cors: { + serializedName: "properties.cors", + type: { + name: "Composite", + className: "CorsRules" + } + } + } + } +}; + +export const ListTableServices: msRest.CompositeMapper = { + serializedName: "ListTableServices", + type: { + name: "Composite", + className: "ListTableServices", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TableServiceProperties" + } + } + } + } + } + } +}; + +export const Table: msRest.CompositeMapper = { + serializedName: "Table", + type: { + name: "Composite", + className: "Table", + modelProperties: { + ...Resource.type.modelProperties, + tableName: { + readOnly: true, + serializedName: "properties.tableName", + type: { + name: "String" + } + } + } + } +}; + export const BlobContainersCreateOrUpdateImmutabilityPolicyHeaders: msRest.CompositeMapper = { serializedName: "blobcontainers-createorupdateimmutabilitypolicy-headers", type: { @@ -4020,3 +4269,63 @@ export const FileShareItems: msRest.CompositeMapper = { } } }; + +export const ListQueueResource: msRest.CompositeMapper = { + serializedName: "ListQueueResource", + type: { + name: "Composite", + className: "ListQueueResource", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ListQueue" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ListTableResource: msRest.CompositeMapper = { + serializedName: "ListTableResource", + type: { + name: "Composite", + className: "ListTableResource", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Table" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/storage/arm-storage/src/models/objectReplicationPoliciesOperationsMappers.ts b/sdk/storage/arm-storage/src/models/objectReplicationPoliciesOperationsMappers.ts index 9f9fc2af4d1c..d6d554050bf8 100644 --- a/sdk/storage/arm-storage/src/models/objectReplicationPoliciesOperationsMappers.ts +++ b/sdk/storage/arm-storage/src/models/objectReplicationPoliciesOperationsMappers.ts @@ -41,6 +41,7 @@ export { KeyVaultProperties, LegalHoldProperties, ListContainerItem, + ListQueue, ManagementPolicy, ManagementPolicyAction, ManagementPolicyBaseBlob, @@ -59,6 +60,7 @@ export { PrivateLinkResource, PrivateLinkServiceConnectionState, ProxyResource, + QueueServiceProperties, Resource, RestorePolicyProperties, RoutingPreference, @@ -66,6 +68,9 @@ export { StorageAccount, StorageAccountInternetEndpoints, StorageAccountMicrosoftEndpoints, + StorageQueue, + Table, + TableServiceProperties, TagFilter, TagProperty, TrackedResource, diff --git a/sdk/storage/arm-storage/src/models/parameters.ts b/sdk/storage/arm-storage/src/models/parameters.ts index 38e6d36a2533..ec3f93d81f8e 100644 --- a/sdk/storage/arm-storage/src/models/parameters.ts +++ b/sdk/storage/arm-storage/src/models/parameters.ts @@ -206,6 +206,18 @@ export const immutabilityPolicyName: msRest.OperationURLParameter = { } } }; +export const include: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "include" + ], + mapper: { + serializedName: "$include", + type: { + name: "String" + } + } +}; export const location: msRest.OperationURLParameter = { parameterPath: "location", mapper: { @@ -274,6 +286,33 @@ export const privateEndpointConnectionName: msRest.OperationURLParameter = { } } }; +export const queueName: msRest.OperationURLParameter = { + parameterPath: "queueName", + mapper: { + required: true, + serializedName: "queueName", + constraints: { + MaxLength: 63, + MinLength: 3, + Pattern: /^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$/ + }, + type: { + name: "String" + } + } +}; +export const queueServiceName: msRest.OperationURLParameter = { + parameterPath: "queueServiceName", + mapper: { + required: true, + isConstant: true, + serializedName: "queueServiceName", + defaultValue: 'default', + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { @@ -316,3 +355,30 @@ export const subscriptionId: msRest.OperationURLParameter = { } } }; +export const tableName: msRest.OperationURLParameter = { + parameterPath: "tableName", + mapper: { + required: true, + serializedName: "tableName", + constraints: { + MaxLength: 63, + MinLength: 3, + Pattern: /^[A-Za-z][A-Za-z0-9]{2,62}$/ + }, + type: { + name: "String" + } + } +}; +export const tableServiceName: msRest.OperationURLParameter = { + parameterPath: "tableServiceName", + mapper: { + required: true, + isConstant: true, + serializedName: "tableServiceName", + defaultValue: 'default', + type: { + name: "String" + } + } +}; diff --git a/sdk/storage/arm-storage/src/models/privateEndpointConnectionsMappers.ts b/sdk/storage/arm-storage/src/models/privateEndpointConnectionsMappers.ts index e254368203fd..c64ce172be80 100644 --- a/sdk/storage/arm-storage/src/models/privateEndpointConnectionsMappers.ts +++ b/sdk/storage/arm-storage/src/models/privateEndpointConnectionsMappers.ts @@ -42,6 +42,7 @@ export { KeyVaultProperties, LegalHoldProperties, ListContainerItem, + ListQueue, ManagementPolicy, ManagementPolicyAction, ManagementPolicyBaseBlob, @@ -60,6 +61,7 @@ export { PrivateLinkResource, PrivateLinkServiceConnectionState, ProxyResource, + QueueServiceProperties, Resource, RestorePolicyProperties, RoutingPreference, @@ -67,6 +69,9 @@ export { StorageAccount, StorageAccountInternetEndpoints, StorageAccountMicrosoftEndpoints, + StorageQueue, + Table, + TableServiceProperties, TagFilter, TagProperty, TrackedResource, diff --git a/sdk/storage/arm-storage/src/models/privateLinkResourcesMappers.ts b/sdk/storage/arm-storage/src/models/privateLinkResourcesMappers.ts index 5f7c0e9e4022..312eb2953574 100644 --- a/sdk/storage/arm-storage/src/models/privateLinkResourcesMappers.ts +++ b/sdk/storage/arm-storage/src/models/privateLinkResourcesMappers.ts @@ -41,6 +41,7 @@ export { KeyVaultProperties, LegalHoldProperties, ListContainerItem, + ListQueue, ManagementPolicy, ManagementPolicyAction, ManagementPolicyBaseBlob, @@ -59,6 +60,7 @@ export { PrivateLinkResourceListResult, PrivateLinkServiceConnectionState, ProxyResource, + QueueServiceProperties, Resource, RestorePolicyProperties, RoutingPreference, @@ -66,6 +68,9 @@ export { StorageAccount, StorageAccountInternetEndpoints, StorageAccountMicrosoftEndpoints, + StorageQueue, + Table, + TableServiceProperties, TagFilter, TagProperty, TrackedResource, diff --git a/sdk/storage/arm-storage/src/models/queueMappers.ts b/sdk/storage/arm-storage/src/models/queueMappers.ts new file mode 100644 index 000000000000..8c3a3f6877f8 --- /dev/null +++ b/sdk/storage/arm-storage/src/models/queueMappers.ts @@ -0,0 +1,79 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ActiveDirectoryProperties, + AzureEntityResource, + AzureFilesIdentityBasedAuthentication, + BaseResource, + BlobContainer, + BlobRestoreParameters, + BlobRestoreRange, + BlobRestoreStatus, + BlobServiceProperties, + ChangeFeed, + CloudError, + CorsRule, + CorsRules, + CustomDomain, + DateAfterCreation, + DateAfterModification, + DeleteRetentionPolicy, + Encryption, + EncryptionScope, + EncryptionScopeKeyVaultProperties, + EncryptionService, + EncryptionServices, + Endpoints, + FileServiceProperties, + FileShare, + FileShareItem, + GeoReplicationStats, + Identity, + ImmutabilityPolicy, + ImmutabilityPolicyProperties, + IPRule, + KeyVaultProperties, + LegalHoldProperties, + ListContainerItem, + ListQueue, + ListQueueResource, + ManagementPolicy, + ManagementPolicyAction, + ManagementPolicyBaseBlob, + ManagementPolicyDefinition, + ManagementPolicyFilter, + ManagementPolicyRule, + ManagementPolicySchema, + ManagementPolicySnapShot, + NetworkRuleSet, + ObjectReplicationPolicy, + ObjectReplicationPolicyFilter, + ObjectReplicationPolicyRule, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + QueueServiceProperties, + Resource, + RestorePolicyProperties, + RoutingPreference, + Sku, + StorageAccount, + StorageAccountInternetEndpoints, + StorageAccountMicrosoftEndpoints, + StorageQueue, + Table, + TableServiceProperties, + TagFilter, + TagProperty, + TrackedResource, + UpdateHistoryProperty, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/storage/arm-storage/src/models/queueServicesMappers.ts b/sdk/storage/arm-storage/src/models/queueServicesMappers.ts new file mode 100644 index 000000000000..3f4bb2912716 --- /dev/null +++ b/sdk/storage/arm-storage/src/models/queueServicesMappers.ts @@ -0,0 +1,79 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ActiveDirectoryProperties, + AzureEntityResource, + AzureFilesIdentityBasedAuthentication, + BaseResource, + BlobContainer, + BlobRestoreParameters, + BlobRestoreRange, + BlobRestoreStatus, + BlobServiceProperties, + ChangeFeed, + CloudError, + CorsRule, + CorsRules, + CustomDomain, + DateAfterCreation, + DateAfterModification, + DeleteRetentionPolicy, + Encryption, + EncryptionScope, + EncryptionScopeKeyVaultProperties, + EncryptionService, + EncryptionServices, + Endpoints, + FileServiceProperties, + FileShare, + FileShareItem, + GeoReplicationStats, + Identity, + ImmutabilityPolicy, + ImmutabilityPolicyProperties, + IPRule, + KeyVaultProperties, + LegalHoldProperties, + ListContainerItem, + ListQueue, + ListQueueServices, + ManagementPolicy, + ManagementPolicyAction, + ManagementPolicyBaseBlob, + ManagementPolicyDefinition, + ManagementPolicyFilter, + ManagementPolicyRule, + ManagementPolicySchema, + ManagementPolicySnapShot, + NetworkRuleSet, + ObjectReplicationPolicy, + ObjectReplicationPolicyFilter, + ObjectReplicationPolicyRule, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + QueueServiceProperties, + Resource, + RestorePolicyProperties, + RoutingPreference, + Sku, + StorageAccount, + StorageAccountInternetEndpoints, + StorageAccountMicrosoftEndpoints, + StorageQueue, + Table, + TableServiceProperties, + TagFilter, + TagProperty, + TrackedResource, + UpdateHistoryProperty, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/storage/arm-storage/src/models/storageAccountsMappers.ts b/sdk/storage/arm-storage/src/models/storageAccountsMappers.ts index 2a844a4c8970..1178fead4acc 100644 --- a/sdk/storage/arm-storage/src/models/storageAccountsMappers.ts +++ b/sdk/storage/arm-storage/src/models/storageAccountsMappers.ts @@ -44,6 +44,7 @@ export { LegalHoldProperties, ListAccountSasResponse, ListContainerItem, + ListQueue, ListServiceSasResponse, ManagementPolicy, ManagementPolicyAction, @@ -62,6 +63,7 @@ export { PrivateLinkResource, PrivateLinkServiceConnectionState, ProxyResource, + QueueServiceProperties, Resource, RestorePolicyProperties, RoutingPreference, @@ -77,6 +79,9 @@ export { StorageAccountMicrosoftEndpoints, StorageAccountRegenerateKeyParameters, StorageAccountUpdateParameters, + StorageQueue, + Table, + TableServiceProperties, TagFilter, TagProperty, TrackedResource, diff --git a/sdk/storage/arm-storage/src/models/tableOperationsMappers.ts b/sdk/storage/arm-storage/src/models/tableOperationsMappers.ts new file mode 100644 index 000000000000..c2768b139b78 --- /dev/null +++ b/sdk/storage/arm-storage/src/models/tableOperationsMappers.ts @@ -0,0 +1,79 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ActiveDirectoryProperties, + AzureEntityResource, + AzureFilesIdentityBasedAuthentication, + BaseResource, + BlobContainer, + BlobRestoreParameters, + BlobRestoreRange, + BlobRestoreStatus, + BlobServiceProperties, + ChangeFeed, + CloudError, + CorsRule, + CorsRules, + CustomDomain, + DateAfterCreation, + DateAfterModification, + DeleteRetentionPolicy, + Encryption, + EncryptionScope, + EncryptionScopeKeyVaultProperties, + EncryptionService, + EncryptionServices, + Endpoints, + FileServiceProperties, + FileShare, + FileShareItem, + GeoReplicationStats, + Identity, + ImmutabilityPolicy, + ImmutabilityPolicyProperties, + IPRule, + KeyVaultProperties, + LegalHoldProperties, + ListContainerItem, + ListQueue, + ListTableResource, + ManagementPolicy, + ManagementPolicyAction, + ManagementPolicyBaseBlob, + ManagementPolicyDefinition, + ManagementPolicyFilter, + ManagementPolicyRule, + ManagementPolicySchema, + ManagementPolicySnapShot, + NetworkRuleSet, + ObjectReplicationPolicy, + ObjectReplicationPolicyFilter, + ObjectReplicationPolicyRule, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + QueueServiceProperties, + Resource, + RestorePolicyProperties, + RoutingPreference, + Sku, + StorageAccount, + StorageAccountInternetEndpoints, + StorageAccountMicrosoftEndpoints, + StorageQueue, + Table, + TableServiceProperties, + TagFilter, + TagProperty, + TrackedResource, + UpdateHistoryProperty, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/storage/arm-storage/src/models/tableServicesMappers.ts b/sdk/storage/arm-storage/src/models/tableServicesMappers.ts new file mode 100644 index 000000000000..d16184de2a2f --- /dev/null +++ b/sdk/storage/arm-storage/src/models/tableServicesMappers.ts @@ -0,0 +1,79 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ActiveDirectoryProperties, + AzureEntityResource, + AzureFilesIdentityBasedAuthentication, + BaseResource, + BlobContainer, + BlobRestoreParameters, + BlobRestoreRange, + BlobRestoreStatus, + BlobServiceProperties, + ChangeFeed, + CloudError, + CorsRule, + CorsRules, + CustomDomain, + DateAfterCreation, + DateAfterModification, + DeleteRetentionPolicy, + Encryption, + EncryptionScope, + EncryptionScopeKeyVaultProperties, + EncryptionService, + EncryptionServices, + Endpoints, + FileServiceProperties, + FileShare, + FileShareItem, + GeoReplicationStats, + Identity, + ImmutabilityPolicy, + ImmutabilityPolicyProperties, + IPRule, + KeyVaultProperties, + LegalHoldProperties, + ListContainerItem, + ListQueue, + ListTableServices, + ManagementPolicy, + ManagementPolicyAction, + ManagementPolicyBaseBlob, + ManagementPolicyDefinition, + ManagementPolicyFilter, + ManagementPolicyRule, + ManagementPolicySchema, + ManagementPolicySnapShot, + NetworkRuleSet, + ObjectReplicationPolicy, + ObjectReplicationPolicyFilter, + ObjectReplicationPolicyRule, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + QueueServiceProperties, + Resource, + RestorePolicyProperties, + RoutingPreference, + Sku, + StorageAccount, + StorageAccountInternetEndpoints, + StorageAccountMicrosoftEndpoints, + StorageQueue, + Table, + TableServiceProperties, + TagFilter, + TagProperty, + TrackedResource, + UpdateHistoryProperty, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/storage/arm-storage/src/operations/blobContainers.ts b/sdk/storage/arm-storage/src/operations/blobContainers.ts index e895c0c114b3..6183603532cd 100644 --- a/sdk/storage/arm-storage/src/operations/blobContainers.ts +++ b/sdk/storage/arm-storage/src/operations/blobContainers.ts @@ -826,7 +826,8 @@ const listOperationSpec: msRest.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.maxpagesize, - Parameters.filter + Parameters.filter, + Parameters.include ], headerParameters: [ Parameters.acceptLanguage @@ -1068,7 +1069,8 @@ const createOrUpdateImmutabilityPolicyOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.BlobContainersCreateOrUpdateImmutabilityPolicyHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.BlobContainersCreateOrUpdateImmutabilityPolicyHeaders } }, serializer @@ -1097,7 +1099,8 @@ const getImmutabilityPolicyOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.BlobContainersGetImmutabilityPolicyHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.BlobContainersGetImmutabilityPolicyHeaders } }, serializer @@ -1126,7 +1129,8 @@ const deleteImmutabilityPolicyOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.BlobContainersDeleteImmutabilityPolicyHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.BlobContainersDeleteImmutabilityPolicyHeaders } }, serializer @@ -1154,7 +1158,8 @@ const lockImmutabilityPolicyOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.BlobContainersLockImmutabilityPolicyHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.BlobContainersLockImmutabilityPolicyHeaders } }, serializer @@ -1195,7 +1200,8 @@ const extendImmutabilityPolicyOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.BlobContainersExtendImmutabilityPolicyHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.BlobContainersExtendImmutabilityPolicyHeaders } }, serializer diff --git a/sdk/storage/arm-storage/src/operations/index.ts b/sdk/storage/arm-storage/src/operations/index.ts index 1c0df5536191..a075eef490eb 100644 --- a/sdk/storage/arm-storage/src/operations/index.ts +++ b/sdk/storage/arm-storage/src/operations/index.ts @@ -21,3 +21,7 @@ export * from "./blobServices"; export * from "./blobContainers"; export * from "./fileServices"; export * from "./fileShares"; +export * from "./queueServices"; +export * from "./queue"; +export * from "./tableServices"; +export * from "./tableOperations"; diff --git a/sdk/storage/arm-storage/src/operations/privateEndpointConnections.ts b/sdk/storage/arm-storage/src/operations/privateEndpointConnections.ts index 820f4b98daea..94e50622fd8a 100644 --- a/sdk/storage/arm-storage/src/operations/privateEndpointConnections.ts +++ b/sdk/storage/arm-storage/src/operations/privateEndpointConnections.ts @@ -75,7 +75,7 @@ export class PrivateEndpointConnections { * account names must be between 3 and 24 characters in length and use numbers and lower-case * letters only. * @param privateEndpointConnectionName The name of the private endpoint connection associated with - * the Storage Account + * the Azure resource * @param [options] The optional parameters * @returns Promise */ @@ -87,7 +87,7 @@ export class PrivateEndpointConnections { * account names must be between 3 and 24 characters in length and use numbers and lower-case * letters only. * @param privateEndpointConnectionName The name of the private endpoint connection associated with - * the Storage Account + * the Azure resource * @param callback The callback */ get(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; @@ -98,7 +98,7 @@ export class PrivateEndpointConnections { * account names must be between 3 and 24 characters in length and use numbers and lower-case * letters only. * @param privateEndpointConnectionName The name of the private endpoint connection associated with - * the Storage Account + * the Azure resource * @param options The optional parameters * @param callback The callback */ @@ -123,7 +123,7 @@ export class PrivateEndpointConnections { * account names must be between 3 and 24 characters in length and use numbers and lower-case * letters only. * @param privateEndpointConnectionName The name of the private endpoint connection associated with - * the Storage Account + * the Azure resource * @param properties The private endpoint connection properties. * @param [options] The optional parameters * @returns Promise @@ -136,7 +136,7 @@ export class PrivateEndpointConnections { * account names must be between 3 and 24 characters in length and use numbers and lower-case * letters only. * @param privateEndpointConnectionName The name of the private endpoint connection associated with - * the Storage Account + * the Azure resource * @param properties The private endpoint connection properties. * @param callback The callback */ @@ -148,7 +148,7 @@ export class PrivateEndpointConnections { * account names must be between 3 and 24 characters in length and use numbers and lower-case * letters only. * @param privateEndpointConnectionName The name of the private endpoint connection associated with - * the Storage Account + * the Azure resource * @param properties The private endpoint connection properties. * @param options The optional parameters * @param callback The callback @@ -175,7 +175,7 @@ export class PrivateEndpointConnections { * account names must be between 3 and 24 characters in length and use numbers and lower-case * letters only. * @param privateEndpointConnectionName The name of the private endpoint connection associated with - * the Storage Account + * the Azure resource * @param [options] The optional parameters * @returns Promise */ @@ -187,7 +187,7 @@ export class PrivateEndpointConnections { * account names must be between 3 and 24 characters in length and use numbers and lower-case * letters only. * @param privateEndpointConnectionName The name of the private endpoint connection associated with - * the Storage Account + * the Azure resource * @param callback The callback */ deleteMethod(resourceGroupName: string, accountName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; @@ -198,7 +198,7 @@ export class PrivateEndpointConnections { * account names must be between 3 and 24 characters in length and use numbers and lower-case * letters only. * @param privateEndpointConnectionName The name of the private endpoint connection associated with - * the Storage Account + * the Azure resource * @param options The optional parameters * @param callback The callback */ diff --git a/sdk/storage/arm-storage/src/operations/queue.ts b/sdk/storage/arm-storage/src/operations/queue.ts new file mode 100644 index 000000000000..970bb8634956 --- /dev/null +++ b/sdk/storage/arm-storage/src/operations/queue.ts @@ -0,0 +1,489 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/queueMappers"; +import * as Parameters from "../models/parameters"; +import { StorageManagementClientContext } from "../storageManagementClientContext"; + +/** Class representing a Queue. */ +export class Queue { + private readonly client: StorageManagementClientContext; + + /** + * Create a Queue. + * @param {StorageManagementClientContext} client Reference to the service client. + */ + constructor(client: StorageManagementClientContext) { + this.client = client; + } + + /** + * Creates a new queue with the specified queue name, under the specified account. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param queueName A queue name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it + * should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) + * characters. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, accountName: string, queueName: string, options?: Models.QueueCreateOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param queueName A queue name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it + * should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) + * characters. + * @param callback The callback + */ + create(resourceGroupName: string, accountName: string, queueName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param queueName A queue name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it + * should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) + * characters. + * @param options The optional parameters + * @param callback The callback + */ + create(resourceGroupName: string, accountName: string, queueName: string, options: Models.QueueCreateOptionalParams, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, accountName: string, queueName: string, options?: Models.QueueCreateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + queueName, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * Creates a new queue with the specified queue name, under the specified account. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param queueName A queue name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it + * should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) + * characters. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, queueName: string, options?: Models.QueueUpdateOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param queueName A queue name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it + * should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) + * characters. + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, queueName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param queueName A queue name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it + * should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) + * characters. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, queueName: string, options: Models.QueueUpdateOptionalParams, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, queueName: string, options?: Models.QueueUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + queueName, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Gets the queue with the specified queue name, under the specified account if it exists. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param queueName A queue name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it + * should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) + * characters. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, queueName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param queueName A queue name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it + * should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) + * characters. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, queueName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param queueName A queue name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it + * should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) + * characters. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, queueName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, queueName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + queueName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Deletes the queue with the specified queue name, under the specified account if it exists. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param queueName A queue name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it + * should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) + * characters. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, queueName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param queueName A queue name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it + * should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) + * characters. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, queueName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param queueName A queue name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it + * should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) + * characters. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, queueName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, queueName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + queueName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Gets a list of all the queues under the specified storage account + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, accountName: string, options?: Models.QueueListOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, options: Models.QueueListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, accountName: string, options?: Models.QueueListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of all the queues under the specified storage account + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.queueName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + metadata: [ + "options", + "metadata" + ] + }, + mapper: { + ...Mappers.StorageQueue, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.StorageQueue + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.queueName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + metadata: [ + "options", + "metadata" + ] + }, + mapper: { + ...Mappers.StorageQueue, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.StorageQueue + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.queueName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StorageQueue + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.queueName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.maxpagesize, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListQueueResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListQueueResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/storage/arm-storage/src/operations/queueServices.ts b/sdk/storage/arm-storage/src/operations/queueServices.ts new file mode 100644 index 000000000000..2a10d91a854d --- /dev/null +++ b/sdk/storage/arm-storage/src/operations/queueServices.ts @@ -0,0 +1,244 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/queueServicesMappers"; +import * as Parameters from "../models/parameters"; +import { StorageManagementClientContext } from "../storageManagementClientContext"; + +/** Class representing a QueueServices. */ +export class QueueServices { + private readonly client: StorageManagementClientContext; + + /** + * Create a QueueServices. + * @param {StorageManagementClientContext} client Reference to the service client. + */ + constructor(client: StorageManagementClientContext) { + this.client = client; + } + + /** + * List all queue services for the storage account + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Sets the properties of a storage account’s Queue service, including properties for Storage + * Analytics and CORS (Cross-Origin Resource Sharing) rules. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param [options] The optional parameters + * @returns Promise + */ + setServiceProperties(resourceGroupName: string, accountName: string, options?: Models.QueueServicesSetServicePropertiesOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param callback The callback + */ + setServiceProperties(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param options The optional parameters + * @param callback The callback + */ + setServiceProperties(resourceGroupName: string, accountName: string, options: Models.QueueServicesSetServicePropertiesOptionalParams, callback: msRest.ServiceCallback): void; + setServiceProperties(resourceGroupName: string, accountName: string, options?: Models.QueueServicesSetServicePropertiesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + setServicePropertiesOperationSpec, + callback) as Promise; + } + + /** + * Gets the properties of a storage account’s Queue service, including properties for Storage + * Analytics and CORS (Cross-Origin Resource Sharing) rules. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param [options] The optional parameters + * @returns Promise + */ + getServiceProperties(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param callback The callback + */ + getServiceProperties(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param options The optional parameters + * @param callback The callback + */ + getServiceProperties(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getServiceProperties(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + getServicePropertiesOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListQueueServices + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const setServicePropertiesOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/{queueServiceName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.queueServiceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + cors: [ + "options", + "cors" + ] + }, + mapper: { + ...Mappers.QueueServiceProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.QueueServiceProperties + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getServicePropertiesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/{queueServiceName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.queueServiceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.QueueServiceProperties + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/storage/arm-storage/src/operations/tableOperations.ts b/sdk/storage/arm-storage/src/operations/tableOperations.ts new file mode 100644 index 000000000000..8baa303e9b3e --- /dev/null +++ b/sdk/storage/arm-storage/src/operations/tableOperations.ts @@ -0,0 +1,451 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/tableOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { StorageManagementClientContext } from "../storageManagementClientContext"; + +/** Class representing a TableOperations. */ +export class TableOperations { + private readonly client: StorageManagementClientContext; + + /** + * Create a TableOperations. + * @param {StorageManagementClientContext} client Reference to the service client. + */ + constructor(client: StorageManagementClientContext) { + this.client = client; + } + + /** + * Creates a new table with the specified table name, under the specified account. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param tableName A table name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a + * numeric character. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, accountName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param tableName A table name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a + * numeric character. + * @param callback The callback + */ + create(resourceGroupName: string, accountName: string, tableName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param tableName A table name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a + * numeric character. + * @param options The optional parameters + * @param callback The callback + */ + create(resourceGroupName: string, accountName: string, tableName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, accountName: string, tableName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + tableName, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * Creates a new table with the specified table name, under the specified account. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param tableName A table name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a + * numeric character. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param tableName A table name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a + * numeric character. + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, tableName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param tableName A table name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a + * numeric character. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, tableName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, tableName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + tableName, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Gets the table with the specified table name, under the specified account if it exists. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param tableName A table name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a + * numeric character. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param tableName A table name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a + * numeric character. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, tableName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param tableName A table name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a + * numeric character. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, tableName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, tableName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + tableName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Deletes the table with the specified table name, under the specified account if it exists. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param tableName A table name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a + * numeric character. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param tableName A table name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a + * numeric character. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, tableName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param tableName A table name must be unique within a storage account and must be between 3 and + * 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a + * numeric character. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, tableName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, tableName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + tableName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Gets a list of all the tables under the specified storage account + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of all the tables under the specified storage account + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.tableName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Table + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.tableName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Table + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.tableName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Table + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.tableName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListTableResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListTableResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/storage/arm-storage/src/operations/tableServices.ts b/sdk/storage/arm-storage/src/operations/tableServices.ts new file mode 100644 index 000000000000..21c066d0e2c8 --- /dev/null +++ b/sdk/storage/arm-storage/src/operations/tableServices.ts @@ -0,0 +1,244 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/tableServicesMappers"; +import * as Parameters from "../models/parameters"; +import { StorageManagementClientContext } from "../storageManagementClientContext"; + +/** Class representing a TableServices. */ +export class TableServices { + private readonly client: StorageManagementClientContext; + + /** + * Create a TableServices. + * @param {StorageManagementClientContext} client Reference to the service client. + */ + constructor(client: StorageManagementClientContext) { + this.client = client; + } + + /** + * List all table services for the storage account. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Sets the properties of a storage account’s Table service, including properties for Storage + * Analytics and CORS (Cross-Origin Resource Sharing) rules. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param [options] The optional parameters + * @returns Promise + */ + setServiceProperties(resourceGroupName: string, accountName: string, options?: Models.TableServicesSetServicePropertiesOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param callback The callback + */ + setServiceProperties(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param options The optional parameters + * @param callback The callback + */ + setServiceProperties(resourceGroupName: string, accountName: string, options: Models.TableServicesSetServicePropertiesOptionalParams, callback: msRest.ServiceCallback): void; + setServiceProperties(resourceGroupName: string, accountName: string, options?: Models.TableServicesSetServicePropertiesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + setServicePropertiesOperationSpec, + callback) as Promise; + } + + /** + * Gets the properties of a storage account’s Table service, including properties for Storage + * Analytics and CORS (Cross-Origin Resource Sharing) rules. + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param [options] The optional parameters + * @returns Promise + */ + getServiceProperties(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param callback The callback + */ + getServiceProperties(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the user's subscription. The name + * is case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case + * letters only. + * @param options The optional parameters + * @param callback The callback + */ + getServiceProperties(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getServiceProperties(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + getServicePropertiesOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListTableServices + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const setServicePropertiesOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/{tableServiceName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.tableServiceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + cors: [ + "options", + "cors" + ] + }, + mapper: { + ...Mappers.TableServiceProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.TableServiceProperties + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getServicePropertiesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/{tableServiceName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.tableServiceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TableServiceProperties + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/storage/arm-storage/src/storageManagementClient.ts b/sdk/storage/arm-storage/src/storageManagementClient.ts index b3d91941a14c..771e681eda69 100644 --- a/sdk/storage/arm-storage/src/storageManagementClient.ts +++ b/sdk/storage/arm-storage/src/storageManagementClient.ts @@ -30,6 +30,10 @@ class StorageManagementClient extends StorageManagementClientContext { blobContainers: operations.BlobContainers; fileServices: operations.FileServices; fileShares: operations.FileShares; + queueServices: operations.QueueServices; + queue: operations.Queue; + tableServices: operations.TableServices; + table: operations.TableOperations; /** * Initializes a new instance of the StorageManagementClient class. @@ -52,6 +56,10 @@ class StorageManagementClient extends StorageManagementClientContext { this.blobContainers = new operations.BlobContainers(this); this.fileServices = new operations.FileServices(this); this.fileShares = new operations.FileShares(this); + this.queueServices = new operations.QueueServices(this); + this.queue = new operations.Queue(this); + this.tableServices = new operations.TableServices(this); + this.table = new operations.TableOperations(this); } }