Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,22 @@ class CognitiveServicesManagementClient extends CognitiveServicesManagementClien
accounts: operations.Accounts;
resourceSkus: operations.ResourceSkus;
operations: operations.Operations;
privateEndpointConnections: operations.PrivateEndpointConnections;
privateLinkResources: operations.PrivateLinkResources;

/**
* Initializes a new instance of the CognitiveServicesManagementClient class.
* @param credentials Credentials needed for the client to connect to Azure.
* @param subscriptionId Azure Subscription ID.
* @param subscriptionId The ID of the target subscription.
* @param [options] The parameter options
*/
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.CognitiveServicesManagementClientOptions) {
super(credentials, subscriptionId, options);
this.accounts = new operations.Accounts(this);
this.resourceSkus = new operations.ResourceSkus(this);
this.operations = new operations.Operations(this);
this.privateEndpointConnections = new operations.PrivateEndpointConnections(this);
this.privateLinkResources = new operations.PrivateLinkResources(this);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class CognitiveServicesManagementClientContext extends msRestAzure.AzureS
/**
* Initializes a new instance of the CognitiveServicesManagementClient class.
* @param credentials Credentials needed for the client to connect to Azure.
* @param subscriptionId Azure Subscription ID.
* @param subscriptionId The ID of the target subscription.
* @param [options] The parameter options
*/
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.CognitiveServicesManagementClientOptions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

export {
AzureEntityResource,
BaseResource,
CognitiveServicesAccount,
CognitiveServicesAccountApiProperties,
Expand All @@ -23,8 +24,18 @@ export {
KeyVaultProperties,
MetricName,
NetworkRuleSet,
PrivateEndpoint,
PrivateEndpointConnection,
PrivateEndpointConnectionProperties,
PrivateLinkResource,
PrivateLinkResourceProperties,
PrivateLinkServiceConnectionState,
ProxyResource,
RegenerateKeyParameters,
Resource,
Sku,
SkuCapability,
TrackedResource,
Usage,
UsagesResult,
UserAssignedIdentity,
Expand Down
265 changes: 265 additions & 0 deletions sdk/cognitiveservices/arm-cognitiveservices/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ export interface Sku {
readonly tier?: SkuTier;
}

/**
* SkuCapability indicates the capability of a certain feature.
*/
export interface SkuCapability {
/**
* The name of the SkuCapability.
*/
name?: string;
/**
* The value of the SkuCapability.
*/
value?: string;
}

/**
* A rule governing the accessibility from a specific ip address or ip range.
*/
Expand Down Expand Up @@ -119,6 +133,89 @@ export interface UserOwnedStorage {
resourceId?: string;
}

/**
* The Private Endpoint resource.
*/
export interface PrivateEndpoint {
/**
* The ARM identifier for Private Endpoint
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly id?: string;
}

/**
* A collection of information about the state of the connection between service consumer and
* provider.
*/
export interface PrivateLinkServiceConnectionState {
/**
* Indicates whether the connection has been Approved/Rejected/Removed by the owner of the
* service. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected'
*/
status?: PrivateEndpointServiceConnectionStatus;
/**
* The reason for approval/rejection of the connection.
*/
description?: string;
/**
* A message indicating if changes on the service provider require any updates on the consumer.
*/
actionRequired?: string;
}

/**
* Properties of the PrivateEndpointConnectProperties.
*/
export interface PrivateEndpointConnectionProperties {
/**
* The resource of private end point.
*/
privateEndpoint?: PrivateEndpoint;
/**
* A collection of information about the state of the connection between service consumer and
* provider.
*/
privateLinkServiceConnectionState: PrivateLinkServiceConnectionState;
/**
* The private link resource group ids.
*/
groupIds?: string[];
}

/**
* An interface representing Resource.
*/
export interface Resource extends BaseResource {
/**
* Fully qualified resource Id for the resource. Ex -
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly id?: string;
/**
* The name of the resource
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly name?: string;
/**
* The type of the resource. Ex- Microsoft.Compute/virtualMachines or
* Microsoft.Storage/storageAccounts.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly type?: string;
}

/**
* The Private Endpoint Connection resource.
*/
export interface PrivateEndpointConnection extends Resource {
/**
* Resource properties.
*/
properties?: PrivateEndpointConnectionProperties;
}

/**
* The api properties for special APIs.
*/
Expand Down Expand Up @@ -162,6 +259,12 @@ export interface CognitiveServicesAccountProperties {
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly internalId?: string;
/**
* Gets the capabilities of the cognitive services account. Each item indicates the capability of
* a specific feature. The values are read-only and for reference only.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly capabilities?: SkuCapability[];
/**
* Optional subdomain name used for token-based authentication.
*/
Expand All @@ -178,6 +281,15 @@ export interface CognitiveServicesAccountProperties {
* The storage accounts for this resource.
*/
userOwnedStorage?: UserOwnedStorage[];
/**
* The private endpoint connection associated with the Cognitive Services account.
*/
privateEndpointConnections?: PrivateEndpointConnection[];
/**
* Whether or not public endpoint access is allowed for this account. Value is optional but if
* passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled'
*/
publicNetworkAccess?: PublicNetworkAccess;
/**
* The api properties for special APIs.
*/
Expand Down Expand Up @@ -638,6 +750,83 @@ export interface ResourceSku {
readonly restrictions?: ResourceSkuRestrictions[];
}

/**
* Properties of a private link resource.
*/
export interface PrivateLinkResourceProperties {
/**
* 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 display name.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly displayName?: 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 private link resource
*/
export interface PrivateLinkResource extends Resource {
/**
* Resource properties.
*/
properties?: PrivateLinkResourceProperties;
}

/**
* A list of private link resources
*/
export interface PrivateLinkResourceListResult {
/**
* Array of private link resources
*/
value?: PrivateLinkResource[];
}

/**
* The resource model definition for a ARM proxy resource. It will have everything other than
* required location and tags
*/
export interface ProxyResource extends Resource {
}

/**
* The resource model definition for a ARM tracked top level resource
*/
export interface TrackedResource extends Resource {
/**
* Resource tags.
*/
tags?: { [propertyName: string]: string };
/**
* The geo-location where the resource lives
*/
location: string;
}

/**
* The resource model definition for a Azure Resource Manager resource with an etag.
*/
export interface AzureEntityResource extends Resource {
/**
* Resource Etag.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly etag?: string;
}

/**
* Optional Parameters.
*/
Expand Down Expand Up @@ -724,6 +913,22 @@ export type NetworkRuleAction = 'Allow' | 'Deny';
*/
export type KeySource = 'Microsoft.CognitiveServices' | 'Microsoft.KeyVault';

/**
* Defines values for PrivateEndpointServiceConnectionStatus.
* Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected'
* @readonly
* @enum {string}
*/
export type PrivateEndpointServiceConnectionStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected';

/**
* Defines values for PublicNetworkAccess.
* Possible values include: 'Enabled', 'Disabled'
* @readonly
* @enum {string}
*/
export type PublicNetworkAccess = 'Enabled' | 'Disabled';

/**
* Defines values for IdentityType.
* Possible values include: 'None', 'SystemAssigned', 'UserAssigned'
Expand Down Expand Up @@ -1112,3 +1317,63 @@ export type CheckDomainAvailabilityResponse = CheckDomainAvailabilityResult & {
parsedBody: CheckDomainAvailabilityResult;
};
};

/**
* Contains response data for the get operation.
*/
export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & {
/**
* 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: PrivateEndpointConnection;
};
};

/**
* Contains response data for the createOrUpdate operation.
*/
export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection & {
/**
* 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: PrivateEndpointConnection;
};
};

/**
* Contains response data for the list operation.
*/
export type PrivateLinkResourcesListResponse = PrivateLinkResourceListResult & {
/**
* 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: PrivateLinkResourceListResult;
};
};
Loading