Skip to content

Commit

Permalink
CodeGen from PR 11892 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 23f590fb7bbaf0b96d3eda7565170999555d6016 into 73024c10eca9d79c262b4f87f9be07fa56d419c9
  • Loading branch information
SDKAuto committed Dec 23, 2020
1 parent a640bde commit cfdbd2d
Show file tree
Hide file tree
Showing 18 changed files with 326 additions and 77 deletions.
9 changes: 4 additions & 5 deletions sdk/signalr/arm-signalr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install @azure/arm-signalr

### How to use

#### nodejs - Authentication, client creation and list operations as an example written in TypeScript.
#### nodejs - client creation and list operations as an example written in TypeScript.

##### Install @azure/ms-rest-nodeauth

Expand All @@ -26,11 +26,10 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0"

##### Sample code

While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package
```typescript
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
import { SignalRManagementClient, SignalRManagementModels, SignalRManagementMappers } from "@azure/arm-signalr";
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
const { SignalRManagementClient } = require("@azure/arm-signalr");
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
Expand Down
4 changes: 2 additions & 2 deletions sdk/signalr/arm-signalr/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const config = {
"@azure/ms-rest-azure-js": "msRestAzure"
},
banner: `/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down
123 changes: 111 additions & 12 deletions sdk/signalr/arm-signalr/src/models/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down Expand Up @@ -343,6 +343,59 @@ export interface PrivateEndpointConnection extends ProxyResource {
privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState;
}

/**
* TLS settings for SignalR
*/
export interface SignalRTlsSettings {
/**
* Request client certificate during TLS handshake if enabled
*/
clientCertEnabled?: boolean;
}

/**
* Properties of user assigned identity.
*/
export interface UserAssignedIdentityProperty {
/**
* Get the principal id for the user assigned identity
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly principalId?: string;
/**
* Get the client id for the user assigned identity
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly clientId?: string;
}

/**
* A class represent managed identities used for request and response
*/
export interface ManagedIdentity {
/**
* Represent the identity type: systemAssigned, userAssigned, None. Possible values include:
* 'None', 'SystemAssigned', 'UserAssigned'
*/
type?: ManagedIdentityType;
/**
* Get or set the user assigned identities
*/
userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentityProperty };
/**
* Get the principal id for the system assigned identity.
* Only be used in response.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly principalId?: string;
/**
* Get the tenant id for the system assigned identity.
* Only be used in response
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly tenantId?: string;
}

/**
* The resource model definition for a ARM tracked top level resource.
*/
Expand All @@ -366,11 +419,6 @@ export interface SignalRResource extends TrackedResource {
* The billing information of the resource.(e.g. Free, Standard)
*/
sku?: ResourceSku;
/**
* Prefix for the hostName of the SignalR service. Retained for future use.
* The hostname will be of format: <hostNamePrefix>.service.signalr.net.
*/
hostNamePrefix?: string;
/**
* List of SignalR featureFlags. e.g. ServiceMode.
*
Expand Down Expand Up @@ -432,11 +480,19 @@ export interface SignalRResource extends TrackedResource {
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly privateEndpointConnections?: PrivateEndpointConnection[];
/**
* TLS settings.
*/
tls?: SignalRTlsSettings;
/**
* The kind of the service - e.g. "SignalR", or "RawWebSockets" for
* "Microsoft.SignalRService/SignalR". Possible values include: 'SignalR', 'RawWebSockets'
*/
kind?: ServiceKind;
/**
* The managed identity response
*/
identity?: ManagedIdentity;
}

/**
Expand Down Expand Up @@ -476,6 +532,33 @@ export interface SignalRCorsSettings {
allowedOrigins?: string[];
}

/**
* Managed identity settings for upstream.
*/
export interface ManagedIdentitySettings {
/**
* The Resource indicating the App ID URI of the target resource.
* It also appears in the aud (audience) claim of the issued token.
*/
resource?: string;
}

/**
* Upstream auth settings.
*/
export interface UpstreamAuthSettings {
/**
* Gets or sets the type of auth. None or ManagedIdentity is supported now. Possible values
* include: 'None', 'ManagedIdentity'
*/
type?: UpstreamAuthType;
/**
* Gets or sets the managed identity settings. It's required if the auth type is set to
* ManagedIdentity.
*/
managedIdentity?: ManagedIdentitySettings;
}

/**
* Upstream template item settings. It defines the Upstream URL of the incoming requests.
* The template defines the pattern of the event, the hub or the category of the incoming request
Expand Down Expand Up @@ -517,6 +600,11 @@ export interface UpstreamTemplate {
* `http://example.com/chat/api/connect`.
*/
urlTemplate: string;
/**
* Gets or sets the auth settings for an upstream. If not set, no auth is used for upstream
* messages.
*/
auth?: UpstreamAuthSettings;
}

/**
Expand Down Expand Up @@ -578,11 +666,6 @@ export interface SignalRNetworkACLs {
* Settings used to provision or configure the resource.
*/
export interface SignalRCreateOrUpdateProperties {
/**
* Prefix for the hostName of the SignalR service. Retained for future use.
* The hostname will be of format: <hostNamePrefix>.service.signalr.net.
*/
hostNamePrefix?: string;
/**
* List of SignalR featureFlags. e.g. ServiceMode.
*
Expand Down Expand Up @@ -873,6 +956,14 @@ export type PrivateLinkServiceConnectionStatus = 'Pending' | 'Approved' | 'Rejec
*/
export type ServiceKind = 'SignalR' | 'RawWebSockets';

/**
* Defines values for ManagedIdentityType.
* Possible values include: 'None', 'SystemAssigned', 'UserAssigned'
* @readonly
* @enum {string}
*/
export type ManagedIdentityType = 'None' | 'SystemAssigned' | 'UserAssigned';

/**
* Defines values for FeatureFlags.
* Possible values include: 'ServiceMode', 'EnableConnectivityLogs', 'EnableMessagingLogs'
Expand All @@ -881,6 +972,14 @@ export type ServiceKind = 'SignalR' | 'RawWebSockets';
*/
export type FeatureFlags = 'ServiceMode' | 'EnableConnectivityLogs' | 'EnableMessagingLogs';

/**
* Defines values for UpstreamAuthType.
* Possible values include: 'None', 'ManagedIdentity'
* @readonly
* @enum {string}
*/
export type UpstreamAuthType = 'None' | 'ManagedIdentity';

/**
* Defines values for ACLAction.
* Possible values include: 'Allow', 'Deny'
Expand Down
Loading

0 comments on commit cfdbd2d

Please sign in to comment.