@azure/arm-appcontainers 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -56,13 +56,13 @@ export interface AppRegistration {
56
56
  }
57
57
 
58
58
  // @public
59
- export type AuthConfig = ProxyResource & {
60
- platform?: AuthPlatform;
59
+ export interface AuthConfig extends ProxyResource {
61
60
  globalValidation?: GlobalValidation;
61
+ httpSettings?: HttpSettings;
62
62
  identityProviders?: IdentityProviders;
63
63
  login?: Login;
64
- httpSettings?: HttpSettings;
65
- };
64
+ platform?: AuthPlatform;
65
+ }
66
66
 
67
67
  // @public
68
68
  export interface AuthConfigCollection {
@@ -145,9 +145,9 @@ export interface AzureStaticWebAppsRegistration {
145
145
  export type BindingType = string;
146
146
 
147
147
  // @public
148
- export type Certificate = TrackedResource & {
148
+ export interface Certificate extends TrackedResource {
149
149
  properties?: CertificateProperties;
150
- };
150
+ }
151
151
 
152
152
  // @public
153
153
  export interface CertificateCollection {
@@ -272,17 +272,17 @@ export interface Container {
272
272
  }
273
273
 
274
274
  // @public
275
- export type ContainerApp = TrackedResource & {
275
+ export interface ContainerApp extends TrackedResource {
276
+ configuration?: Configuration;
277
+ readonly customDomainVerificationId?: string;
276
278
  identity?: ManagedServiceIdentity;
277
- readonly provisioningState?: ContainerAppProvisioningState;
278
- managedEnvironmentId?: string;
279
- readonly latestRevisionName?: string;
280
279
  readonly latestRevisionFqdn?: string;
281
- readonly customDomainVerificationId?: string;
282
- configuration?: Configuration;
280
+ readonly latestRevisionName?: string;
281
+ managedEnvironmentId?: string;
282
+ readonly outboundIpAddresses?: string[];
283
+ readonly provisioningState?: ContainerAppProvisioningState;
283
284
  template?: Template;
284
- readonly outboundIPAddresses?: string[];
285
- };
285
+ }
286
286
 
287
287
  // @public
288
288
  export interface ContainerAppCollection {
@@ -636,19 +636,19 @@ export interface CustomDomain {
636
636
  }
637
637
 
638
638
  // @public
639
- export type CustomHostnameAnalysisResult = ProxyResource & {
640
- readonly hostName?: string;
641
- readonly isHostnameAlreadyVerified?: boolean;
642
- readonly customDomainVerificationTest?: DnsVerificationTestResult;
639
+ export interface CustomHostnameAnalysisResult {
640
+ alternateCNameRecords?: string[];
641
+ alternateTxtRecords?: string[];
642
+ aRecords?: string[];
643
+ cNameRecords?: string[];
644
+ readonly conflictingContainerAppResourceId?: string;
643
645
  readonly customDomainVerificationFailureInfo?: DefaultErrorResponse;
646
+ readonly customDomainVerificationTest?: DnsVerificationTestResult;
644
647
  readonly hasConflictOnManagedEnvironment?: boolean;
645
- readonly conflictingContainerAppResourceId?: string;
646
- cNameRecords?: string[];
648
+ readonly hostName?: string;
649
+ readonly isHostnameAlreadyVerified?: boolean;
647
650
  txtRecords?: string[];
648
- aRecords?: string[];
649
- alternateCNameRecords?: string[];
650
- alternateTxtRecords?: string[];
651
- };
651
+ }
652
652
 
653
653
  // @public
654
654
  export interface CustomOpenIdConnectProvider {
@@ -675,15 +675,15 @@ export interface Dapr {
675
675
  }
676
676
 
677
677
  // @public
678
- export type DaprComponent = ProxyResource & {
678
+ export interface DaprComponent extends ProxyResource {
679
679
  componentType?: string;
680
- version?: string;
681
680
  ignoreErrors?: boolean;
682
681
  initTimeout?: string;
683
- secrets?: Secret[];
684
682
  metadata?: DaprMetadata[];
685
683
  scopes?: string[];
686
- };
684
+ secrets?: Secret[];
685
+ version?: string;
686
+ }
687
687
 
688
688
  // @public
689
689
  export interface DaprComponents {
@@ -899,187 +899,128 @@ export interface JwtClaimChecks {
899
899
 
900
900
  // @public
901
901
  export enum KnownAccessMode {
902
- // (undocumented)
903
902
  ReadOnly = "ReadOnly",
904
- // (undocumented)
905
903
  ReadWrite = "ReadWrite"
906
904
  }
907
905
 
908
906
  // @public
909
907
  export enum KnownActiveRevisionsMode {
910
- // (undocumented)
911
908
  Multiple = "Multiple",
912
- // (undocumented)
913
909
  Single = "Single"
914
910
  }
915
911
 
916
912
  // @public
917
913
  export enum KnownAppProtocol {
918
- // (undocumented)
919
914
  Grpc = "grpc",
920
- // (undocumented)
921
915
  Http = "http"
922
916
  }
923
917
 
924
918
  // @public
925
919
  export enum KnownBindingType {
926
- // (undocumented)
927
920
  Disabled = "Disabled",
928
- // (undocumented)
929
921
  SniEnabled = "SniEnabled"
930
922
  }
931
923
 
932
924
  // @public
933
925
  export enum KnownCertificateProvisioningState {
934
- // (undocumented)
935
926
  Canceled = "Canceled",
936
- // (undocumented)
937
927
  DeleteFailed = "DeleteFailed",
938
- // (undocumented)
939
928
  Failed = "Failed",
940
- // (undocumented)
941
929
  Pending = "Pending",
942
- // (undocumented)
943
930
  Succeeded = "Succeeded"
944
931
  }
945
932
 
946
933
  // @public
947
934
  export enum KnownCheckNameAvailabilityReason {
948
- // (undocumented)
949
935
  AlreadyExists = "AlreadyExists",
950
- // (undocumented)
951
936
  Invalid = "Invalid"
952
937
  }
953
938
 
954
939
  // @public
955
940
  export enum KnownContainerAppProvisioningState {
956
- // (undocumented)
957
941
  Canceled = "Canceled",
958
- // (undocumented)
959
942
  Failed = "Failed",
960
- // (undocumented)
961
943
  InProgress = "InProgress",
962
- // (undocumented)
963
944
  Succeeded = "Succeeded"
964
945
  }
965
946
 
966
947
  // @public
967
948
  export enum KnownCreatedByType {
968
- // (undocumented)
969
949
  Application = "Application",
970
- // (undocumented)
971
950
  Key = "Key",
972
- // (undocumented)
973
951
  ManagedIdentity = "ManagedIdentity",
974
- // (undocumented)
975
952
  User = "User"
976
953
  }
977
954
 
978
955
  // @public
979
956
  export enum KnownEnvironmentProvisioningState {
980
- // (undocumented)
981
957
  Canceled = "Canceled",
982
- // (undocumented)
983
958
  Failed = "Failed",
984
- // (undocumented)
985
959
  InfrastructureSetupComplete = "InfrastructureSetupComplete",
986
- // (undocumented)
987
960
  InfrastructureSetupInProgress = "InfrastructureSetupInProgress",
988
- // (undocumented)
989
961
  InitializationInProgress = "InitializationInProgress",
990
- // (undocumented)
991
962
  ScheduledForDelete = "ScheduledForDelete",
992
- // (undocumented)
993
963
  Succeeded = "Succeeded",
994
- // (undocumented)
995
964
  UpgradeFailed = "UpgradeFailed",
996
- // (undocumented)
997
965
  UpgradeRequested = "UpgradeRequested",
998
- // (undocumented)
999
966
  Waiting = "Waiting"
1000
967
  }
1001
968
 
1002
969
  // @public
1003
970
  export enum KnownIngressTransportMethod {
1004
- // (undocumented)
1005
971
  Auto = "auto",
1006
- // (undocumented)
1007
972
  Http = "http",
1008
- // (undocumented)
1009
973
  Http2 = "http2"
1010
974
  }
1011
975
 
1012
976
  // @public
1013
977
  export enum KnownManagedServiceIdentityType {
1014
- // (undocumented)
1015
978
  None = "None",
1016
- // (undocumented)
1017
979
  SystemAssigned = "SystemAssigned",
1018
- // (undocumented)
1019
980
  SystemAssignedUserAssigned = "SystemAssigned,UserAssigned",
1020
- // (undocumented)
1021
981
  UserAssigned = "UserAssigned"
1022
982
  }
1023
983
 
1024
984
  // @public
1025
985
  export enum KnownRevisionHealthState {
1026
- // (undocumented)
1027
986
  Healthy = "Healthy",
1028
- // (undocumented)
1029
987
  None = "None",
1030
- // (undocumented)
1031
988
  Unhealthy = "Unhealthy"
1032
989
  }
1033
990
 
1034
991
  // @public
1035
992
  export enum KnownRevisionProvisioningState {
1036
- // (undocumented)
1037
993
  Deprovisioned = "Deprovisioned",
1038
- // (undocumented)
1039
994
  Deprovisioning = "Deprovisioning",
1040
- // (undocumented)
1041
995
  Failed = "Failed",
1042
- // (undocumented)
1043
996
  Provisioned = "Provisioned",
1044
- // (undocumented)
1045
997
  Provisioning = "Provisioning"
1046
998
  }
1047
999
 
1048
1000
  // @public
1049
1001
  export enum KnownScheme {
1050
- // (undocumented)
1051
1002
  Http = "HTTP",
1052
- // (undocumented)
1053
1003
  Https = "HTTPS"
1054
1004
  }
1055
1005
 
1056
1006
  // @public
1057
1007
  export enum KnownSourceControlOperationState {
1058
- // (undocumented)
1059
1008
  Canceled = "Canceled",
1060
- // (undocumented)
1061
1009
  Failed = "Failed",
1062
- // (undocumented)
1063
1010
  InProgress = "InProgress",
1064
- // (undocumented)
1065
1011
  Succeeded = "Succeeded"
1066
1012
  }
1067
1013
 
1068
1014
  // @public
1069
1015
  export enum KnownStorageType {
1070
- // (undocumented)
1071
1016
  AzureFile = "AzureFile",
1072
- // (undocumented)
1073
1017
  EmptyDir = "EmptyDir"
1074
1018
  }
1075
1019
 
1076
1020
  // @public
1077
1021
  export enum KnownType {
1078
- // (undocumented)
1079
1022
  Liveness = "Liveness",
1080
- // (undocumented)
1081
1023
  Readiness = "Readiness",
1082
- // (undocumented)
1083
1024
  Startup = "Startup"
1084
1025
  }
1085
1026
 
@@ -1109,17 +1050,17 @@ export interface LoginScopes {
1109
1050
  }
1110
1051
 
1111
1052
  // @public
1112
- export type ManagedEnvironment = TrackedResource & {
1113
- readonly provisioningState?: EnvironmentProvisioningState;
1114
- daprAIInstrumentationKey?: string;
1053
+ export interface ManagedEnvironment extends TrackedResource {
1054
+ appLogsConfiguration?: AppLogsConfiguration;
1115
1055
  daprAIConnectionString?: string;
1116
- vnetConfiguration?: VnetConfiguration;
1117
- readonly deploymentErrors?: string;
1056
+ daprAIInstrumentationKey?: string;
1118
1057
  readonly defaultDomain?: string;
1058
+ readonly deploymentErrors?: string;
1059
+ readonly provisioningState?: EnvironmentProvisioningState;
1119
1060
  readonly staticIp?: string;
1120
- appLogsConfiguration?: AppLogsConfiguration;
1061
+ vnetConfiguration?: VnetConfiguration;
1121
1062
  zoneRedundant?: boolean;
1122
- };
1063
+ }
1123
1064
 
1124
1065
  // @public
1125
1066
  export interface ManagedEnvironments {
@@ -1224,9 +1165,9 @@ export interface ManagedEnvironmentsStoragesListOptionalParams extends coreClien
1224
1165
  export type ManagedEnvironmentsStoragesListResponse = ManagedEnvironmentStoragesCollection;
1225
1166
 
1226
1167
  // @public
1227
- export type ManagedEnvironmentStorage = ProxyResource & {
1168
+ export interface ManagedEnvironmentStorage extends ProxyResource {
1228
1169
  properties?: ManagedEnvironmentStorageProperties;
1229
- };
1170
+ }
1230
1171
 
1231
1172
  // @public
1232
1173
  export interface ManagedEnvironmentStorageProperties {
@@ -1339,7 +1280,8 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption
1339
1280
  export type OperationsListResponse = AvailableOperations;
1340
1281
 
1341
1282
  // @public
1342
- export type ProxyResource = Resource & {};
1283
+ export interface ProxyResource extends Resource {
1284
+ }
1343
1285
 
1344
1286
  // @public
1345
1287
  export interface QueueScaleRule {
@@ -1364,10 +1306,10 @@ export interface RegistryInfo {
1364
1306
  }
1365
1307
 
1366
1308
  // @public
1367
- export type Replica = ProxyResource & {
1368
- readonly createdTime?: Date;
1309
+ export interface Replica extends ProxyResource {
1369
1310
  containers?: ReplicaContainer[];
1370
- };
1311
+ readonly createdTime?: Date;
1312
+ }
1371
1313
 
1372
1314
  // @public
1373
1315
  export interface ReplicaCollection {
@@ -1392,17 +1334,17 @@ export interface Resource {
1392
1334
  }
1393
1335
 
1394
1336
  // @public
1395
- export type Revision = ProxyResource & {
1337
+ export interface Revision extends ProxyResource {
1338
+ readonly active?: boolean;
1396
1339
  readonly createdTime?: Date;
1397
1340
  readonly fqdn?: string;
1398
- readonly template?: Template;
1399
- readonly active?: boolean;
1400
- readonly replicas?: number;
1401
- readonly trafficWeight?: number;
1402
- readonly provisioningError?: string;
1403
1341
  readonly healthState?: RevisionHealthState;
1342
+ readonly provisioningError?: string;
1404
1343
  readonly provisioningState?: RevisionProvisioningState;
1405
- };
1344
+ readonly replicas?: number;
1345
+ readonly template?: Template;
1346
+ readonly trafficWeight?: number;
1347
+ }
1406
1348
 
1407
1349
  // @public
1408
1350
  export interface RevisionCollection {
@@ -1452,12 +1394,12 @@ export interface SecretsCollection {
1452
1394
  }
1453
1395
 
1454
1396
  // @public
1455
- export type SourceControl = ProxyResource & {
1456
- readonly operationState?: SourceControlOperationState;
1457
- repoUrl?: string;
1397
+ export interface SourceControl extends ProxyResource {
1458
1398
  branch?: string;
1459
1399
  githubActionConfiguration?: GithubActionConfiguration;
1460
- };
1400
+ readonly operationState?: SourceControlOperationState;
1401
+ repoUrl?: string;
1402
+ }
1461
1403
 
1462
1404
  // @public
1463
1405
  export interface SourceControlCollection {
@@ -1490,12 +1432,12 @@ export interface Template {
1490
1432
  }
1491
1433
 
1492
1434
  // @public
1493
- export type TrackedResource = Resource & {
1435
+ export interface TrackedResource extends Resource {
1436
+ location: string;
1494
1437
  tags?: {
1495
1438
  [propertyName: string]: string;
1496
1439
  };
1497
- location: string;
1498
- };
1440
+ }
1499
1441
 
1500
1442
  // @public
1501
1443
  export interface TrafficWeight {
@@ -8,6 +8,11 @@
8
8
 
9
9
  import * as coreClient from "@azure/core-client";
10
10
  import * as coreRestPipeline from "@azure/core-rest-pipeline";
11
+ import {
12
+ PipelineRequest,
13
+ PipelineResponse,
14
+ SendRequest
15
+ } from "@azure/core-rest-pipeline";
11
16
  import * as coreAuth from "@azure/core-auth";
12
17
  import {
13
18
  ContainerAppsAuthConfigsImpl,
@@ -69,7 +74,7 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient {
69
74
  credential: credentials
70
75
  };
71
76
 
72
- const packageDetails = `azsdk-js-arm-appcontainers/1.0.0`;
77
+ const packageDetails = `azsdk-js-arm-appcontainers/1.1.0`;
73
78
  const userAgentPrefix =
74
79
  options.userAgentOptions && options.userAgentOptions.userAgentPrefix
75
80
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@@ -89,27 +94,34 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient {
89
94
  };
90
95
  super(optionsWithDefaults);
91
96
 
97
+ let bearerTokenAuthenticationPolicyFound: boolean = false;
92
98
  if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
93
99
  const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
94
- const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
100
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
95
101
  (pipelinePolicy) =>
96
102
  pipelinePolicy.name ===
97
103
  coreRestPipeline.bearerTokenAuthenticationPolicyName
98
104
  );
99
- if (!bearerTokenAuthenticationPolicyFound) {
100
- this.pipeline.removePolicy({
101
- name: coreRestPipeline.bearerTokenAuthenticationPolicyName
102
- });
103
- this.pipeline.addPolicy(
104
- coreRestPipeline.bearerTokenAuthenticationPolicy({
105
- scopes: `${optionsWithDefaults.baseUri}/.default`,
106
- challengeCallbacks: {
107
- authorizeRequestOnChallenge:
108
- coreClient.authorizeRequestOnClaimChallenge
109
- }
110
- })
111
- );
112
- }
105
+ }
106
+ if (
107
+ !options ||
108
+ !options.pipeline ||
109
+ options.pipeline.getOrderedPolicies().length == 0 ||
110
+ !bearerTokenAuthenticationPolicyFound
111
+ ) {
112
+ this.pipeline.removePolicy({
113
+ name: coreRestPipeline.bearerTokenAuthenticationPolicyName
114
+ });
115
+ this.pipeline.addPolicy(
116
+ coreRestPipeline.bearerTokenAuthenticationPolicy({
117
+ credential: credentials,
118
+ scopes: `${optionsWithDefaults.credentialScopes}`,
119
+ challengeCallbacks: {
120
+ authorizeRequestOnChallenge:
121
+ coreClient.authorizeRequestOnClaimChallenge
122
+ }
123
+ })
124
+ );
113
125
  }
114
126
  // Parameter assignments
115
127
  this.subscriptionId = subscriptionId;
@@ -134,6 +146,35 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient {
134
146
  this.containerAppsSourceControls = new ContainerAppsSourceControlsImpl(
135
147
  this
136
148
  );
149
+ this.addCustomApiVersionPolicy(options.apiVersion);
150
+ }
151
+
152
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
153
+ private addCustomApiVersionPolicy(apiVersion?: string) {
154
+ if (!apiVersion) {
155
+ return;
156
+ }
157
+ const apiVersionPolicy = {
158
+ name: "CustomApiVersionPolicy",
159
+ async sendRequest(
160
+ request: PipelineRequest,
161
+ next: SendRequest
162
+ ): Promise<PipelineResponse> {
163
+ const param = request.url.split("?");
164
+ if (param.length > 1) {
165
+ const newParams = param[1].split("&").map((item) => {
166
+ if (item.indexOf("api-version") > -1) {
167
+ return "api-version=" + apiVersion;
168
+ } else {
169
+ return item;
170
+ }
171
+ });
172
+ request.url = param[0] + "?" + newParams.join("&");
173
+ }
174
+ return next(request);
175
+ }
176
+ };
177
+ this.pipeline.addPolicy(apiVersionPolicy);
137
178
  }
138
179
 
139
180
  containerAppsAuthConfigs: ContainerAppsAuthConfigs;