@azure/arm-appservice
Version:
A generated SDK for WebSiteManagementClient.
1,107 lines • 199 kB
JavaScript
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { setContinuationToken } from "../pagingHelper.js";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers.js";
import * as Parameters from "../models/parameters.js";
import { createHttpPoller } from "@azure/core-lro";
import { createLroSpec } from "../lroImpl.js";
/// <reference lib="esnext.asynciterable" />
/** Class containing StaticSites operations. */
export class StaticSitesImpl {
client;
/**
* Initialize a new instance of the class StaticSites class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* Description for Get all Static Sites for a subscription.
* @param options The options parameters.
*/
list(options) {
const iter = this.listPagingAll(options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.listPagingPage(options, settings);
},
};
}
async *listPagingPage(options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._list(options);
const page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._listNext(continuationToken, options);
continuationToken = result.nextLink;
const page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
async *listPagingAll(options) {
for await (const page of this.listPagingPage(options)) {
yield* page;
}
}
/**
* Description for Gets all static sites in the specified resource group.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param options The options parameters.
*/
listStaticSitesByResourceGroup(resourceGroupName, options) {
const iter = this.getStaticSitesByResourceGroupPagingAll(resourceGroupName, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.getStaticSitesByResourceGroupPagingPage(resourceGroupName, options, settings);
},
};
}
async *getStaticSitesByResourceGroupPagingPage(resourceGroupName, options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._getStaticSitesByResourceGroup(resourceGroupName, options);
const page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._getStaticSitesByResourceGroupNext(resourceGroupName, continuationToken, options);
continuationToken = result.nextLink;
const page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
async *getStaticSitesByResourceGroupPagingAll(resourceGroupName, options) {
for await (const page of this.getStaticSitesByResourceGroupPagingPage(resourceGroupName, options)) {
yield* page;
}
}
/**
* Description for Gets the list of users of a static site.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site.
* @param authprovider The auth provider for the users.
* @param options The options parameters.
*/
listStaticSiteUsers(resourceGroupName, name, authprovider, options) {
const iter = this.listStaticSiteUsersPagingAll(resourceGroupName, name, authprovider, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.listStaticSiteUsersPagingPage(resourceGroupName, name, authprovider, options, settings);
},
};
}
async *listStaticSiteUsersPagingPage(resourceGroupName, name, authprovider, options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._listStaticSiteUsers(resourceGroupName, name, authprovider, options);
const page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._listStaticSiteUsersNext(resourceGroupName, name, authprovider, continuationToken, options);
continuationToken = result.nextLink;
const page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
async *listStaticSiteUsersPagingAll(resourceGroupName, name, authprovider, options) {
for await (const page of this.listStaticSiteUsersPagingPage(resourceGroupName, name, authprovider, options)) {
yield* page;
}
}
/**
* Description for Gets all static site builds for a particular static site.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site.
* @param options The options parameters.
*/
listStaticSiteBuilds(resourceGroupName, name, options) {
const iter = this.getStaticSiteBuildsPagingAll(resourceGroupName, name, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.getStaticSiteBuildsPagingPage(resourceGroupName, name, options, settings);
},
};
}
async *getStaticSiteBuildsPagingPage(resourceGroupName, name, options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._getStaticSiteBuilds(resourceGroupName, name, options);
const page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._getStaticSiteBuildsNext(resourceGroupName, name, continuationToken, options);
continuationToken = result.nextLink;
const page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
async *getStaticSiteBuildsPagingAll(resourceGroupName, name, options) {
for await (const page of this.getStaticSiteBuildsPagingPage(resourceGroupName, name, options)) {
yield* page;
}
}
/**
* Returns overviews of database connections for a static site build
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site
* @param environmentName The stage site identifier.
* @param options The options parameters.
*/
listBuildDatabaseConnections(resourceGroupName, name, environmentName, options) {
const iter = this.getBuildDatabaseConnectionsPagingAll(resourceGroupName, name, environmentName, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.getBuildDatabaseConnectionsPagingPage(resourceGroupName, name, environmentName, options, settings);
},
};
}
async *getBuildDatabaseConnectionsPagingPage(resourceGroupName, name, environmentName, options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._getBuildDatabaseConnections(resourceGroupName, name, environmentName, options);
const page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._getBuildDatabaseConnectionsNext(resourceGroupName, name, environmentName, continuationToken, options);
continuationToken = result.nextLink;
const page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
async *getBuildDatabaseConnectionsPagingAll(resourceGroupName, name, environmentName, options) {
for await (const page of this.getBuildDatabaseConnectionsPagingPage(resourceGroupName, name, environmentName, options)) {
yield* page;
}
}
/**
* Description for Gets the functions of a particular static site build.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site.
* @param environmentName The stage site identifier.
* @param options The options parameters.
*/
listStaticSiteBuildFunctions(resourceGroupName, name, environmentName, options) {
const iter = this.listStaticSiteBuildFunctionsPagingAll(resourceGroupName, name, environmentName, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.listStaticSiteBuildFunctionsPagingPage(resourceGroupName, name, environmentName, options, settings);
},
};
}
async *listStaticSiteBuildFunctionsPagingPage(resourceGroupName, name, environmentName, options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._listStaticSiteBuildFunctions(resourceGroupName, name, environmentName, options);
const page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._listStaticSiteBuildFunctionsNext(resourceGroupName, name, environmentName, continuationToken, options);
continuationToken = result.nextLink;
const page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
async *listStaticSiteBuildFunctionsPagingAll(resourceGroupName, name, environmentName, options) {
for await (const page of this.listStaticSiteBuildFunctionsPagingPage(resourceGroupName, name, environmentName, options)) {
yield* page;
}
}
/**
* Returns details of database connections for a static site build
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site
* @param environmentName The stage site identifier.
* @param options The options parameters.
*/
listBuildDatabaseConnectionsWithDetails(resourceGroupName, name, environmentName, options) {
const iter = this.getBuildDatabaseConnectionsWithDetailsPagingAll(resourceGroupName, name, environmentName, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.getBuildDatabaseConnectionsWithDetailsPagingPage(resourceGroupName, name, environmentName, options, settings);
},
};
}
async *getBuildDatabaseConnectionsWithDetailsPagingPage(resourceGroupName, name, environmentName, options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._getBuildDatabaseConnectionsWithDetails(resourceGroupName, name, environmentName, options);
const page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._getBuildDatabaseConnectionsWithDetailsNext(resourceGroupName, name, environmentName, continuationToken, options);
continuationToken = result.nextLink;
const page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
async *getBuildDatabaseConnectionsWithDetailsPagingAll(resourceGroupName, name, environmentName, options) {
for await (const page of this.getBuildDatabaseConnectionsWithDetailsPagingPage(resourceGroupName, name, environmentName, options)) {
yield* page;
}
}
/**
* Description for Gets the details of the user provided function apps registered with a static site
* build
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site.
* @param environmentName The stage site identifier.
* @param options The options parameters.
*/
listUserProvidedFunctionAppsForStaticSiteBuild(resourceGroupName, name, environmentName, options) {
const iter = this.getUserProvidedFunctionAppsForStaticSiteBuildPagingAll(resourceGroupName, name, environmentName, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.getUserProvidedFunctionAppsForStaticSiteBuildPagingPage(resourceGroupName, name, environmentName, options, settings);
},
};
}
async *getUserProvidedFunctionAppsForStaticSiteBuildPagingPage(resourceGroupName, name, environmentName, options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._getUserProvidedFunctionAppsForStaticSiteBuild(resourceGroupName, name, environmentName, options);
const page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._getUserProvidedFunctionAppsForStaticSiteBuildNext(resourceGroupName, name, environmentName, continuationToken, options);
continuationToken = result.nextLink;
const page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
async *getUserProvidedFunctionAppsForStaticSiteBuildPagingAll(resourceGroupName, name, environmentName, options) {
for await (const page of this.getUserProvidedFunctionAppsForStaticSiteBuildPagingPage(resourceGroupName, name, environmentName, options)) {
yield* page;
}
}
/**
* Description for Gets the basic auth properties for a static site as a collection.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site.
* @param options The options parameters.
*/
listBasicAuth(resourceGroupName, name, options) {
const iter = this.listBasicAuthPagingAll(resourceGroupName, name, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.listBasicAuthPagingPage(resourceGroupName, name, options, settings);
},
};
}
async *listBasicAuthPagingPage(resourceGroupName, name, options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._listBasicAuth(resourceGroupName, name, options);
const page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._listBasicAuthNext(resourceGroupName, name, continuationToken, options);
continuationToken = result.nextLink;
const page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
async *listBasicAuthPagingAll(resourceGroupName, name, options) {
for await (const page of this.listBasicAuthPagingPage(resourceGroupName, name, options)) {
yield* page;
}
}
/**
* Description for Gets all static site custom domains for a particular static site.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site resource to search in.
* @param options The options parameters.
*/
listStaticSiteCustomDomains(resourceGroupName, name, options) {
const iter = this.listStaticSiteCustomDomainsPagingAll(resourceGroupName, name, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.listStaticSiteCustomDomainsPagingPage(resourceGroupName, name, options, settings);
},
};
}
async *listStaticSiteCustomDomainsPagingPage(resourceGroupName, name, options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._listStaticSiteCustomDomains(resourceGroupName, name, options);
const page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._listStaticSiteCustomDomainsNext(resourceGroupName, name, continuationToken, options);
continuationToken = result.nextLink;
const page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
async *listStaticSiteCustomDomainsPagingAll(resourceGroupName, name, options) {
for await (const page of this.listStaticSiteCustomDomainsPagingPage(resourceGroupName, name, options)) {
yield* page;
}
}
/**
* Returns overviews of database connections for a static site
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site
* @param options The options parameters.
*/
listDatabaseConnections(resourceGroupName, name, options) {
const iter = this.getDatabaseConnectionsPagingAll(resourceGroupName, name, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.getDatabaseConnectionsPagingPage(resourceGroupName, name, options, settings);
},
};
}
async *getDatabaseConnectionsPagingPage(resourceGroupName, name, options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._getDatabaseConnections(resourceGroupName, name, options);
const page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._getDatabaseConnectionsNext(resourceGroupName, name, continuationToken, options);
continuationToken = result.nextLink;
const page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
async *getDatabaseConnectionsPagingAll(resourceGroupName, name, options) {
for await (const page of this.getDatabaseConnectionsPagingPage(resourceGroupName, name, options)) {
yield* page;
}
}
/**
* Description for Gets the functions of a static site.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site.
* @param options The options parameters.
*/
listStaticSiteFunctions(resourceGroupName, name, options) {
const iter = this.listStaticSiteFunctionsPagingAll(resourceGroupName, name, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.listStaticSiteFunctionsPagingPage(resourceGroupName, name, options, settings);
},
};
}
async *listStaticSiteFunctionsPagingPage(resourceGroupName, name, options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._listStaticSiteFunctions(resourceGroupName, name, options);
const page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._listStaticSiteFunctionsNext(resourceGroupName, name, continuationToken, options);
continuationToken = result.nextLink;
const page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
async *listStaticSiteFunctionsPagingAll(resourceGroupName, name, options) {
for await (const page of this.listStaticSiteFunctionsPagingPage(resourceGroupName, name, options)) {
yield* page;
}
}
/**
* Description for Gets the list of private endpoint connections associated with a static site
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site.
* @param options The options parameters.
*/
listPrivateEndpointConnectionList(resourceGroupName, name, options) {
const iter = this.getPrivateEndpointConnectionListPagingAll(resourceGroupName, name, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.getPrivateEndpointConnectionListPagingPage(resourceGroupName, name, options, settings);
},
};
}
async *getPrivateEndpointConnectionListPagingPage(resourceGroupName, name, options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._getPrivateEndpointConnectionList(resourceGroupName, name, options);
const page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._getPrivateEndpointConnectionListNext(resourceGroupName, name, continuationToken, options);
continuationToken = result.nextLink;
const page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
async *getPrivateEndpointConnectionListPagingAll(resourceGroupName, name, options) {
for await (const page of this.getPrivateEndpointConnectionListPagingPage(resourceGroupName, name, options)) {
yield* page;
}
}
/**
* Returns details of database connections for a static site
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site
* @param options The options parameters.
*/
listDatabaseConnectionsWithDetails(resourceGroupName, name, options) {
const iter = this.getDatabaseConnectionsWithDetailsPagingAll(resourceGroupName, name, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.getDatabaseConnectionsWithDetailsPagingPage(resourceGroupName, name, options, settings);
},
};
}
async *getDatabaseConnectionsWithDetailsPagingPage(resourceGroupName, name, options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._getDatabaseConnectionsWithDetails(resourceGroupName, name, options);
const page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._getDatabaseConnectionsWithDetailsNext(resourceGroupName, name, continuationToken, options);
continuationToken = result.nextLink;
const page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
async *getDatabaseConnectionsWithDetailsPagingAll(resourceGroupName, name, options) {
for await (const page of this.getDatabaseConnectionsWithDetailsPagingPage(resourceGroupName, name, options)) {
yield* page;
}
}
/**
* Description for Gets the details of the user provided function apps registered with a static site
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site.
* @param options The options parameters.
*/
listUserProvidedFunctionAppsForStaticSite(resourceGroupName, name, options) {
const iter = this.getUserProvidedFunctionAppsForStaticSitePagingAll(resourceGroupName, name, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.getUserProvidedFunctionAppsForStaticSitePagingPage(resourceGroupName, name, options, settings);
},
};
}
async *getUserProvidedFunctionAppsForStaticSitePagingPage(resourceGroupName, name, options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._getUserProvidedFunctionAppsForStaticSite(resourceGroupName, name, options);
const page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._getUserProvidedFunctionAppsForStaticSiteNext(resourceGroupName, name, continuationToken, options);
continuationToken = result.nextLink;
const page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
async *getUserProvidedFunctionAppsForStaticSitePagingAll(resourceGroupName, name, options) {
for await (const page of this.getUserProvidedFunctionAppsForStaticSitePagingPage(resourceGroupName, name, options)) {
yield* page;
}
}
/**
* Returns details of all backends linked to a static site
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site
* @param options The options parameters.
*/
listLinkedBackends(resourceGroupName, name, options) {
const iter = this.getLinkedBackendsPagingAll(resourceGroupName, name, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.getLinkedBackendsPagingPage(resourceGroupName, name, options, settings);
},
};
}
async *getLinkedBackendsPagingPage(resourceGroupName, name, options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._getLinkedBackends(resourceGroupName, name, options);
const page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._getLinkedBackendsNext(resourceGroupName, name, continuationToken, options);
continuationToken = result.nextLink;
const page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
async *getLinkedBackendsPagingAll(resourceGroupName, name, options) {
for await (const page of this.getLinkedBackendsPagingPage(resourceGroupName, name, options)) {
yield* page;
}
}
/**
* Returns details of all backends linked to a static site build
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site
* @param environmentName The stage site identifier
* @param options The options parameters.
*/
listLinkedBackendsForBuild(resourceGroupName, name, environmentName, options) {
const iter = this.getLinkedBackendsForBuildPagingAll(resourceGroupName, name, environmentName, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.getLinkedBackendsForBuildPagingPage(resourceGroupName, name, environmentName, options, settings);
},
};
}
async *getLinkedBackendsForBuildPagingPage(resourceGroupName, name, environmentName, options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._getLinkedBackendsForBuild(resourceGroupName, name, environmentName, options);
const page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._getLinkedBackendsForBuildNext(resourceGroupName, name, environmentName, continuationToken, options);
continuationToken = result.nextLink;
const page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
async *getLinkedBackendsForBuildPagingAll(resourceGroupName, name, environmentName, options) {
for await (const page of this.getLinkedBackendsForBuildPagingPage(resourceGroupName, name, environmentName, options)) {
yield* page;
}
}
/**
* Description for Generates a preview workflow file for the static site
* @param location Location where you plan to create the static site.
* @param staticSitesWorkflowPreviewRequest A JSON representation of the
* StaticSitesWorkflowPreviewRequest properties. See example.
* @param options The options parameters.
*/
previewWorkflow(location, staticSitesWorkflowPreviewRequest, options) {
return this.client.sendOperationRequest({ location, staticSitesWorkflowPreviewRequest, options }, previewWorkflowOperationSpec);
}
/**
* Description for Get all Static Sites for a subscription.
* @param options The options parameters.
*/
_list(options) {
return this.client.sendOperationRequest({ options }, listOperationSpec);
}
/**
* Description for Gets all static sites in the specified resource group.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param options The options parameters.
*/
_getStaticSitesByResourceGroup(resourceGroupName, options) {
return this.client.sendOperationRequest({ resourceGroupName, options }, getStaticSitesByResourceGroupOperationSpec);
}
/**
* Description for Gets the details of a static site.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site.
* @param options The options parameters.
*/
getStaticSite(resourceGroupName, name, options) {
return this.client.sendOperationRequest({ resourceGroupName, name, options }, getStaticSiteOperationSpec);
}
/**
* Description for Creates a new static site in an existing resource group, or updates an existing
* static site.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site to create or update.
* @param staticSiteEnvelope A JSON representation of the staticsite properties. See example.
* @param options The options parameters.
*/
async beginCreateOrUpdateStaticSite(resourceGroupName, name, staticSiteEnvelope, options) {
const directSendOperation = async (args, spec) => {
return this.client.sendOperationRequest(args, spec);
};
const sendOperationFn = async (args, spec) => {
let currentRawResponse = undefined;
const providedCallback = args.options?.onResponse;
const callback = (rawResponse, flatResponse) => {
currentRawResponse = rawResponse;
providedCallback?.(rawResponse, flatResponse);
};
const updatedArgs = {
...args,
options: {
...args.options,
onResponse: callback,
},
};
const flatResponse = await directSendOperation(updatedArgs, spec);
return {
flatResponse,
rawResponse: {
statusCode: currentRawResponse.status,
body: currentRawResponse.parsedBody,
headers: currentRawResponse.headers.toJSON(),
},
};
};
const lro = createLroSpec({
sendOperationFn,
args: { resourceGroupName, name, staticSiteEnvelope, options },
spec: createOrUpdateStaticSiteOperationSpec,
});
const poller = await createHttpPoller(lro, {
restoreFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs,
});
await poller.poll();
return poller;
}
/**
* Description for Creates a new static site in an existing resource group, or updates an existing
* static site.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site to create or update.
* @param staticSiteEnvelope A JSON representation of the staticsite properties. See example.
* @param options The options parameters.
*/
async beginCreateOrUpdateStaticSiteAndWait(resourceGroupName, name, staticSiteEnvelope, options) {
const poller = await this.beginCreateOrUpdateStaticSite(resourceGroupName, name, staticSiteEnvelope, options);
return poller.pollUntilDone();
}
/**
* Description for Deletes a static site.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site to delete.
* @param options The options parameters.
*/
async beginDeleteStaticSite(resourceGroupName, name, options) {
const directSendOperation = async (args, spec) => {
return this.client.sendOperationRequest(args, spec);
};
const sendOperationFn = async (args, spec) => {
let currentRawResponse = undefined;
const providedCallback = args.options?.onResponse;
const callback = (rawResponse, flatResponse) => {
currentRawResponse = rawResponse;
providedCallback?.(rawResponse, flatResponse);
};
const updatedArgs = {
...args,
options: {
...args.options,
onResponse: callback,
},
};
const flatResponse = await directSendOperation(updatedArgs, spec);
return {
flatResponse,
rawResponse: {
statusCode: currentRawResponse.status,
body: currentRawResponse.parsedBody,
headers: currentRawResponse.headers.toJSON(),
},
};
};
const lro = createLroSpec({
sendOperationFn,
args: { resourceGroupName, name, options },
spec: deleteStaticSiteOperationSpec,
});
const poller = await createHttpPoller(lro, {
restoreFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs,
});
await poller.poll();
return poller;
}
/**
* Description for Deletes a static site.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site to delete.
* @param options The options parameters.
*/
async beginDeleteStaticSiteAndWait(resourceGroupName, name, options) {
const poller = await this.beginDeleteStaticSite(resourceGroupName, name, options);
return poller.pollUntilDone();
}
/**
* Description for Creates a new static site in an existing resource group, or updates an existing
* static site.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site to create or update.
* @param staticSiteEnvelope A JSON representation of the staticsite properties. See example.
* @param options The options parameters.
*/
updateStaticSite(resourceGroupName, name, staticSiteEnvelope, options) {
return this.client.sendOperationRequest({ resourceGroupName, name, staticSiteEnvelope, options }, updateStaticSiteOperationSpec);
}
/**
* Description for Gets the list of users of a static site.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site.
* @param authprovider The auth provider for the users.
* @param options The options parameters.
*/
_listStaticSiteUsers(resourceGroupName, name, authprovider, options) {
return this.client.sendOperationRequest({ resourceGroupName, name, authprovider, options }, listStaticSiteUsersOperationSpec);
}
/**
* Description for Deletes the user entry from the static site.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the staticsite.
* @param authprovider The auth provider for this user.
* @param userid The user id of the user.
* @param options The options parameters.
*/
deleteStaticSiteUser(resourceGroupName, name, authprovider, userid, options) {
return this.client.sendOperationRequest({ resourceGroupName, name, authprovider, userid, options }, deleteStaticSiteUserOperationSpec);
}
/**
* Description for Updates a user entry with the listed roles
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site.
* @param authprovider The auth provider for this user.
* @param userid The user id of the user.
* @param staticSiteUserEnvelope A JSON representation of the StaticSiteUser properties. See example.
* @param options The options parameters.
*/
updateStaticSiteUser(resourceGroupName, name, authprovider, userid, staticSiteUserEnvelope, options) {
return this.client.sendOperationRequest({
resourceGroupName,
name,
authprovider,
userid,
staticSiteUserEnvelope,
options,
}, updateStaticSiteUserOperationSpec);
}
/**
* Description for Gets all static site builds for a particular static site.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site.
* @param options The options parameters.
*/
_getStaticSiteBuilds(resourceGroupName, name, options) {
return this.client.sendOperationRequest({ resourceGroupName, name, options }, getStaticSiteBuildsOperationSpec);
}
/**
* Description for Gets the details of a static site build.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site.
* @param environmentName The stage site identifier.
* @param options The options parameters.
*/
getStaticSiteBuild(resourceGroupName, name, environmentName, options) {
return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, options }, getStaticSiteBuildOperationSpec);
}
/**
* Description for Deletes a static site build.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site.
* @param environmentName The stage site identifier.
* @param options The options parameters.
*/
async beginDeleteStaticSiteBuild(resourceGroupName, name, environmentName, options) {
const directSendOperation = async (args, spec) => {
return this.client.sendOperationRequest(args, spec);
};
const sendOperationFn = async (args, spec) => {
let currentRawResponse = undefined;
const providedCallback = args.options?.onResponse;
const callback = (rawResponse, flatResponse) => {
currentRawResponse = rawResponse;
providedCallback?.(rawResponse, flatResponse);
};
const updatedArgs = {
...args,
options: {
...args.options,
onResponse: callback,
},
};
const flatResponse = await directSendOperation(updatedArgs, spec);
return {
flatResponse,
rawResponse: {
statusCode: currentRawResponse.status,
body: currentRawResponse.parsedBody,
headers: currentRawResponse.headers.toJSON(),
},
};
};
const lro = createLroSpec({
sendOperationFn,
args: { resourceGroupName, name, environmentName, options },
spec: deleteStaticSiteBuildOperationSpec,
});
const poller = await createHttpPoller(lro, {
restoreFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs,
});
await poller.poll();
return poller;
}
/**
* Description for Deletes a static site build.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site.
* @param environmentName The stage site identifier.
* @param options The options parameters.
*/
async beginDeleteStaticSiteBuildAndWait(resourceGroupName, name, environmentName, options) {
const poller = await this.beginDeleteStaticSiteBuild(resourceGroupName, name, environmentName, options);
return poller.pollUntilDone();
}
/**
* Description for Creates or updates the app settings of a static site build.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site.
* @param environmentName The stage site identifier.
* @param appSettings The dictionary containing the static site app settings to update.
* @param options The options parameters.
*/
createOrUpdateStaticSiteBuildAppSettings(resourceGroupName, name, environmentName, appSettings, options) {
return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, appSettings, options }, createOrUpdateStaticSiteBuildAppSettingsOperationSpec);
}
/**
* Description for Creates or updates the function app settings of a static site build.
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the static site.
* @param environmentName The stage site identifier.
* @param appSettings The dictionary containing the static site function app settings to update.
* @param options The options parameters.
*/
createOrUpdateStaticSiteBuildFunctionAppSettings(resourceGroupName, name, environmentName, appSettings, options) {
return this.client.sendOperationRequest({ resourceGroupName, name, environmentName, appSettings, options }, createOrUpdateStaticSiteBuildFunctionAppSettingsOperationSpec);
}
/**
* Returns overviews of