From c5ab2b8903654ecd30db49bc1d895e67033f22e0 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 3 Apr 2023 08:18:09 +0000 Subject: [PATCH] CodeGen from PR 23400 in Azure/azure-rest-api-specs Merge 04c80dbcd202248c83e9c2d2d53bf95db60f6b07 into 06042d4ffed6a1ea8319c39cd07ea21efe5d49f7 --- ...rceManager.ApiManagement.netstandard2.0.cs | 594 ++++++++++++++- .../ApiManagementAuthorizationServerData.cs | 10 +- .../src/Generated/ApiManagementBackendData.cs | 8 +- .../Generated/ApiManagementBackendResource.cs | 4 +- .../ApiManagementIdentityProviderData.cs | 6 +- .../ApiManagementOpenIdConnectProviderData.cs | 10 +- .../Generated/ApiManagementProductResource.cs | 7 + .../src/Generated/ApiManagementServiceData.cs | 15 +- .../Generated/ApiManagementServiceResource.cs | 314 +++++++- .../src/Generated/ApiResource.cs | 60 ++ ...orizationAccessPolicyContractCollection.cs | 348 +++++++++ .../AuthorizationAccessPolicyContractData.cs | 43 ++ ...thorizationAccessPolicyContractResource.cs | 301 ++++++++ .../AuthorizationContractCollection.cs | 348 +++++++++ .../Generated/AuthorizationContractData.cs | 57 ++ .../AuthorizationContractResource.cs | 495 ++++++++++++ ...AuthorizationProviderContractCollection.cs | 348 +++++++++ .../AuthorizationProviderContractData.cs | 47 ++ .../AuthorizationProviderContractResource.cs | 354 +++++++++ .../DocumentationContractCollection.cs | 348 +++++++++ .../Generated/DocumentationContractData.cs | 42 ++ .../DocumentationContractResource.cs | 354 +++++++++ .../Extensions/ApiManagementExtensions.cs | 190 +++++ .../PolicyFragmentContractOperationSource.cs | 40 + .../AdditionalLocation.Serialization.cs | 34 +- .../Generated/Models/AdditionalLocation.cs | 11 +- .../ApiCreateOrUpdateContent.Serialization.cs | 5 + .../Models/ApiCreateOrUpdateContent.cs | 2 + ...ntAuthorizationServerData.Serialization.cs | 34 +- ...tAuthorizationServerPatch.Serialization.cs | 34 +- .../ApiManagementAuthorizationServerPatch.cs | 10 +- .../Models/ApiManagementBackendPatch.cs | 4 +- ...iderCreateOrUpdateContent.Serialization.cs | 13 +- ...ntIdentityProviderCreateOrUpdateContent.cs | 6 +- ...ementIdentityProviderData.Serialization.cs | 13 +- ...mentIdentityProviderPatch.Serialization.cs | 5 + .../ApiManagementIdentityProviderPatch.cs | 2 + ...OpenIdConnectProviderData.Serialization.cs | 34 +- ...penIdConnectProviderPatch.Serialization.cs | 10 + ...ApiManagementOpenIdConnectProviderPatch.cs | 4 + .../ApiManagementServiceData.Serialization.cs | 34 +- ...ApiManagementServicePatch.Serialization.cs | 34 +- .../Models/ApiManagementServicePatch.cs | 15 +- .../src/Generated/Models/ApiSchemaType.cs | 2 +- ...nticationSettingsContract.Serialization.cs | 55 +- .../Models/AuthenticationSettingsContract.cs | 15 +- ...nAccessPolicyContractData.Serialization.cs | 106 +++ ...ionAccessPolicyListResult.Serialization.cs | 62 ++ .../AuthorizationAccessPolicyListResult.cs | 41 + ...onsentCodeRequestContract.Serialization.cs | 26 + ...zationConfirmConsentCodeRequestContract.cs | 21 + ...AuthorizationContractData.Serialization.cs | 166 ++++ .../AuthorizationError.Serialization.cs | 55 ++ .../Generated/Models/AuthorizationError.cs | 32 + .../AuthorizationListResult.Serialization.cs | 62 ++ .../Models/AuthorizationListResult.cs | 41 + ...ationLoginRequestContract.Serialization.cs | 26 + .../AuthorizationLoginRequestContract.cs | 23 + ...tionLoginResponseContract.Serialization.cs | 33 + .../AuthorizationLoginResponseContract.cs | 28 + ...ationProviderContractData.Serialization.cs | 117 +++ ...izationProviderListResult.Serialization.cs | 51 ++ .../Models/AuthorizationProviderListResult.cs | 37 + ...nProviderOAuth2GrantTypes.Serialization.cs | 88 +++ .../AuthorizationProviderOAuth2GrantTypes.cs | 37 + ...ionProviderOAuth2Settings.Serialization.cs | 66 ++ .../AuthorizationProviderOAuth2Settings.cs | 34 + .../src/Generated/Models/AuthorizationType.cs | 48 ++ ...DocumentationContractData.Serialization.cs | 100 +++ ...ocumentationContractPatch.Serialization.cs | 34 + .../Models/DocumentationContractPatch.cs | 23 + .../DocumentationListResult.Serialization.cs | 51 ++ .../Models/DocumentationListResult.cs | 37 + .../Generated/Models/HostnameConfiguration.cs | 4 +- .../src/Generated/Models/NatGatewayState.cs | 51 ++ .../src/Generated/Models/OAuth2GrantType.cs | 51 ++ .../Generated/Models/PolicyContentFormat.cs | 4 +- .../Models/PolicyDescriptionListResult.cs | 6 +- .../Models/PolicyFragmentContentFormat.cs | 51 ++ ...olicyFragmentContractData.Serialization.cs | 117 +++ .../PolicyFragmentListResult.Serialization.cs | 62 ++ .../Models/PolicyFragmentListResult.cs | 41 + .../PortalConfigContractData.Serialization.cs | 175 +++++ ...ortalConfigCorsProperties.Serialization.cs | 60 ++ .../Models/PortalConfigCorsProperties.cs | 32 + ...PortalConfigCspProperties.Serialization.cs | 115 +++ .../Models/PortalConfigCspProperties.cs | 42 ++ ...onfigDelegationProperties.Serialization.cs | 93 +++ .../PortalConfigDelegationProperties.cs | 42 ++ .../PortalConfigListResult.Serialization.cs | 51 ++ .../Models/PortalConfigListResult.cs | 37 + ...talConfigPropertiesSignin.Serialization.cs | 49 ++ .../Models/PortalConfigPropertiesSignin.cs | 28 + ...talConfigPropertiesSignup.Serialization.cs | 49 ++ .../Models/PortalConfigPropertiesSignup.cs | 28 + ...gTermsOfServiceProperties.Serialization.cs | 60 ++ .../PortalConfigTermsOfServiceProperties.cs | 32 + .../Generated/Models/PortalSettingsCspMode.cs | 54 ++ .../Models/PortalSettingsListResult.cs | 6 +- .../Generated/Models/ReportRecordContract.cs | 4 +- .../ResolverContractData.Serialization.cs | 111 +++ .../ResolverContractPatch.Serialization.cs | 39 + .../Generated/Models/ResolverContractPatch.cs | 25 + .../ResolverListResult.Serialization.cs | 62 ++ .../Generated/Models/ResolverListResult.cs | 41 + ...sourceCollectionValueItem.Serialization.cs | 63 ++ .../Models/ResourceCollectionValueItem.cs | 30 + .../ResourceListResult.Serialization.cs | 61 ++ .../Generated/Models/ResourceListResult.cs | 40 + ...TranslateRequiredQueryParametersConduct.cs | 51 ++ .../Models/WikiContractData.Serialization.cs | 106 +++ ...WikiDocumentationContract.Serialization.cs | 44 ++ .../Models/WikiDocumentationContract.cs | 28 + .../WikiUpdateContract.Serialization.cs | 34 + .../Generated/Models/WikiUpdateContract.cs | 25 + .../PolicyFragmentContractCollection.cs | 353 +++++++++ .../Generated/PolicyFragmentContractData.cs | 47 ++ .../PolicyFragmentContractResource.cs | 410 ++++++++++ .../PortalConfigContractCollection.cs | 340 +++++++++ .../src/Generated/PortalConfigContractData.cs | 95 +++ .../Generated/PortalConfigContractResource.cs | 283 +++++++ .../Generated/ResolverContractCollection.cs | 348 +++++++++ .../src/Generated/ResolverContractData.cs | 46 ++ .../src/Generated/ResolverContractResource.cs | 405 ++++++++++ .../ApiDiagnosticRestOperations.cs | 58 +- .../ApiIssueAttachmentRestOperations.cs | 50 +- .../ApiIssueCommentRestOperations.cs | 50 +- .../RestOperations/ApiIssueRestOperations.cs | 58 +- .../ApiManagementRestOperations.cs | 10 +- .../ApiManagementServiceRestOperations.cs | 171 +++-- .../ApiManagementServiceSkusRestOperations.cs | 18 +- .../ApiManagementSkusRestOperations.cs | 10 +- .../ApiOperationPolicyRestOperations.cs | 42 +- .../ApiOperationRestOperations.cs | 58 +- .../RestOperations/ApiPolicyRestOperations.cs | 42 +- .../ApiProductRestOperations.cs | 18 +- .../ApiReleaseRestOperations.cs | 58 +- .../RestOperations/ApiRestOperations.cs | 74 +- .../ApiRevisionRestOperations.cs | 18 +- .../RestOperations/ApiSchemaRestOperations.cs | 50 +- .../ApiTagDescriptionRestOperations.cs | 50 +- .../ApiVersionSetRestOperations.cs | 58 +- .../RestOperations/ApiWikiRestOperations.cs | 497 ++++++++++++ ...AuthorizationAccessPolicyRestOperations.cs | 542 +++++++++++++ .../AuthorizationLoginLinksRestOperations.cs | 139 ++++ .../AuthorizationProviderRestOperations.cs | 486 ++++++++++++ .../AuthorizationRestOperations.cs | 603 +++++++++++++++ .../AuthorizationServerRestOperations.cs | 66 +- .../RestOperations/BackendRestOperations.cs | 70 +- .../RestOperations/CacheRestOperations.cs | 58 +- .../CertificateRestOperations.cs | 58 +- .../ContentItemRestOperations.cs | 72 +- .../ContentTypeRestOperations.cs | 64 +- .../DelegationSettingsRestOperations.cs | 42 +- .../DeletedServicesRestOperations.cs | 18 +- .../DiagnosticRestOperations.cs | 58 +- .../DocumentationRestOperations.cs | 671 +++++++++++++++++ .../EmailTemplateRestOperations.cs | 58 +- .../GatewayApiRestOperations.cs | 42 +- ...tewayCertificateAuthorityRestOperations.cs | 50 +- ...ewayHostnameConfigurationRestOperations.cs | 50 +- .../RestOperations/GatewayRestOperations.cs | 82 +- .../GlobalSchemaRestOperations.cs | 50 +- .../GraphQLApiResolverPolicyRestOperations.cs | 618 +++++++++++++++ .../GraphQLApiResolverRestOperations.cs | 711 ++++++++++++++++++ .../RestOperations/GroupRestOperations.cs | 58 +- .../RestOperations/GroupUserRestOperations.cs | 42 +- .../IdentityProviderRestOperations.cs | 66 +- .../RestOperations/IssueRestOperations.cs | 26 +- .../RestOperations/LoggerRestOperations.cs | 58 +- .../NamedValueRestOperations.cs | 74 +- .../NetworkStatusRestOperations.cs | 18 +- ...otificationRecipientEmailRestOperations.cs | 34 +- ...NotificationRecipientUserRestOperations.cs | 34 +- .../NotificationRestOperations.cs | 34 +- .../OpenIdConnectProviderRestOperations.cs | 66 +- .../RestOperations/OperationRestOperations.cs | 18 +- ...workDependenciesEndpointsRestOperations.cs | 10 +- .../PolicyDescriptionRestOperations.cs | 10 +- .../PolicyFragmentRestOperations.cs | 595 +++++++++++++++ .../RestOperations/PolicyRestOperations.cs | 42 +- .../PortalConfigRestOperations.cs | 487 ++++++++++++ .../PortalRevisionRestOperations.cs | 50 +- .../PortalSettingsRestOperations.cs | 10 +- ...PrivateEndpointConnectionRestOperations.cs | 50 +- .../ProductApiRestOperations.cs | 42 +- .../ProductGroupRestOperations.cs | 42 +- .../ProductPolicyRestOperations.cs | 42 +- .../RestOperations/ProductRestOperations.cs | 74 +- .../ProductSubscriptionsRestOperations.cs | 18 +- .../ProductWikiRestOperations.cs | 497 ++++++++++++ .../QuotaByCounterKeysRestOperations.cs | 18 +- .../QuotaByPeriodKeysRestOperations.cs | 18 +- .../RestOperations/RegionRestOperations.cs | 18 +- .../RestOperations/ReportsRestOperations.cs | 122 +-- .../SignInSettingsRestOperations.cs | 34 +- .../SignUpSettingsRestOperations.cs | 34 +- .../SubscriptionRestOperations.cs | 82 +- .../TagResourceRestOperations.cs | 18 +- .../RestOperations/TagRestOperations.cs | 202 ++--- .../TenantAccessGitRestOperations.cs | 18 +- .../TenantAccessRestOperations.cs | 74 +- .../TenantConfigurationRestOperations.cs | 34 +- .../TenantSettingsRestOperations.cs | 26 +- .../UserConfirmationPasswordRestOperations.cs | 10 +- .../RestOperations/UserGroupRestOperations.cs | 18 +- .../UserIdentitiesRestOperations.cs | 18 +- .../RestOperations/UserRestOperations.cs | 74 +- .../UserSubscriptionRestOperations.cs | 26 +- .../ServiceApiResolverPolicyCollection.cs | 327 ++++++++ .../ServiceApiResolverPolicyResource.cs | 364 +++++++++ .../src/Generated/ServiceApiWikiResource.cs | 432 +++++++++++ .../Generated/ServiceProductWikiResource.cs | 432 +++++++++++ .../src/Generated/WikiContractData.cs | 41 + .../src/autorest.md | 2 +- 215 files changed, 19768 insertions(+), 1764 deletions(-) create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractData.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractData.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractData.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/LongRunningOperation/PolicyFragmentContractOperationSource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyContractData.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeRequestContract.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeRequestContract.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationContractData.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationError.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationError.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginRequestContract.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginRequestContract.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResponseContract.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResponseContract.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderContractData.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationType.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractData.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NatGatewayState.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2GrantType.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentContentFormat.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentContractData.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigContractData.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsCspMode.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractData.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TranslateRequiredQueryParametersConduct.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiContractData.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractData.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractData.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiWikiRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationAccessPolicyRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationLoginLinksRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationProviderRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DocumentationRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverPolicyRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyFragmentRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalConfigRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductWikiRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WikiContractData.cs diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.netstandard2.0.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.netstandard2.0.cs index 036424b18b89a..9e4a2479c5c13 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.netstandard2.0.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.netstandard2.0.cs @@ -218,6 +218,8 @@ public ApiManagementAuthorizationServerData() { } public string ResourceOwnerUsername { get { throw null; } set { } } public System.Collections.Generic.IList TokenBodyParameters { get { throw null; } } public string TokenEndpoint { get { throw null; } set { } } + public bool? UseInApiDocumentation { get { throw null; } set { } } + public bool? UseInTestConsole { get { throw null; } set { } } } public partial class ApiManagementAuthorizationServerResource : Azure.ResourceManager.ArmResource { @@ -529,6 +531,16 @@ public static partial class ApiManagementExtensions public static Azure.ResourceManager.ApiManagement.ApiTagDescriptionResource GetApiTagDescriptionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiTagResource GetApiTagResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiVersionSetResource GetApiVersionSetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractResource GetAuthorizationAccessPolicyContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.AuthorizationContractResource GetAuthorizationContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.AuthorizationProviderContractResource GetAuthorizationProviderContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.DocumentationContractResource GetDocumentationContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.PolicyFragmentContractResource GetPolicyFragmentContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.PortalConfigContractResource GetPortalConfigContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ResolverContractResource GetResolverContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ServiceApiResolverPolicyResource GetServiceApiResolverPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ServiceApiWikiResource GetServiceApiWikiResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ServiceProductWikiResource GetServiceProductWikiResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.TenantAccessInfoResource GetTenantAccessInfoResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } public partial class ApiManagementGatewayCertificateAuthorityCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -773,6 +785,7 @@ public ApiManagementIdentityProviderData() { } public System.Collections.Generic.IList AllowedTenants { get { throw null; } } public string Authority { get { throw null; } set { } } public string ClientId { get { throw null; } set { } } + public string ClientLibrary { get { throw null; } set { } } public string ClientSecret { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? IdentityProviderType { get { throw null; } set { } } public string PasswordResetPolicyName { get { throw null; } set { } } @@ -979,6 +992,8 @@ public ApiManagementOpenIdConnectProviderData() { } public string Description { get { throw null; } set { } } public string DisplayName { get { throw null; } set { } } public string MetadataEndpoint { get { throw null; } set { } } + public bool? UseInApiDocumentation { get { throw null; } set { } } + public bool? UseInTestConsole { get { throw null; } set { } } } public partial class ApiManagementOpenIdConnectProviderResource : Azure.ResourceManager.ArmResource { @@ -1297,6 +1312,7 @@ protected ApiManagementProductResource() { } public virtual Azure.AsyncPageable GetProductApisAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetProductGroups(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetProductGroupsAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceProductWikiResource GetServiceProductWiki() { throw null; } public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiManagementProductPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiManagementProductPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -1363,7 +1379,9 @@ public ApiManagementServiceData(Azure.Core.AzureLocation location, Azure.Resourc public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Uri ManagementApiUri { get { throw null; } } public string MinApiVersion { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.NatGatewayState? NatGatewayState { get { throw null; } set { } } public string NotificationSenderEmail { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList OutboundPublicIPAddresses { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.PlatformVersion? PlatformVersion { get { throw null; } } public System.Uri PortalUri { get { throw null; } } public System.Collections.Generic.IList PrivateEndpointConnections { get { throw null; } } @@ -1394,10 +1412,10 @@ protected ApiManagementServiceResource() { } public virtual System.Threading.Tasks.Task> ApplyNetworkConfigurationUpdatesAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceApplyNetworkConfigurationContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Backup(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceBackupRestoreContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> BackupAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceBackupRestoreContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateOrUpdateContentItem(string contentTypeId, string contentItemId, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateContentItemAsync(string contentTypeId, string contentItemId, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateOrUpdateContentType(string contentTypeId, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateContentTypeAsync(string contentTypeId, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrUpdateContentItem(string contentTypeId, string contentItemId, Azure.ResourceManager.ApiManagement.Models.ApiManagementContentItem apiManagementContentItem, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateContentItemAsync(string contentTypeId, string contentItemId, Azure.ResourceManager.ApiManagement.Models.ApiManagementContentItem apiManagementContentItem, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrUpdateContentType(string contentTypeId, Azure.ResourceManager.ApiManagement.Models.ApiManagementContentType apiManagementContentType, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateContentTypeAsync(string contentTypeId, Azure.ResourceManager.ApiManagement.Models.ApiManagementContentType apiManagementContentType, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1492,6 +1510,9 @@ protected ApiManagementServiceResource() { } public virtual System.Threading.Tasks.Task> GetApiVersionSetAsync(string versionSetId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiVersionSetCollection GetApiVersionSets() { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAuthorizationProviderContract(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAuthorizationProviderContractAsync(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationProviderContractCollection GetAuthorizationProviderContracts() { throw null; } public virtual Azure.Pageable GetAvailableApiManagementServiceSkus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAvailableApiManagementServiceSkusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetContentItem(string contentTypeId, string contentItemId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1504,6 +1525,9 @@ protected ApiManagementServiceResource() { } public virtual System.Threading.Tasks.Task> GetContentTypeAsync(string contentTypeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetContentTypes(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetContentTypesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDocumentationContract(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDocumentationContractAsync(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.DocumentationContractCollection GetDocumentationContracts() { throw null; } public virtual Azure.Response GetNetworkStatusByLocation(Azure.Core.AzureLocation locationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNetworkStatusByLocationAsync(Azure.Core.AzureLocation locationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetNetworkStatuses(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1512,6 +1536,12 @@ protected ApiManagementServiceResource() { } public virtual Azure.AsyncPageable GetOutboundNetworkDependenciesEndpointsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetPolicyDescriptions(Azure.ResourceManager.ApiManagement.Models.PolicyScopeContract? scope = default(Azure.ResourceManager.ApiManagement.Models.PolicyScopeContract?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPolicyDescriptionsAsync(Azure.ResourceManager.ApiManagement.Models.PolicyScopeContract? scope = default(Azure.ResourceManager.ApiManagement.Models.PolicyScopeContract?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetPolicyFragmentContract(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPolicyFragmentContractAsync(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.PolicyFragmentContractCollection GetPolicyFragmentContracts() { throw null; } + public virtual Azure.Response GetPortalConfigContract(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPortalConfigContractAsync(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.PortalConfigContractCollection GetPortalConfigContracts() { throw null; } public virtual Azure.Pageable GetPortalSettings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPortalSettingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetProductsByTags(string filter = null, int? top = default(int?), int? skip = default(int?), bool? includeNotTaggedProducts = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1547,6 +1577,8 @@ protected ApiManagementServiceResource() { } public virtual Azure.ResourceManager.ApiManagement.TenantAccessInfoCollection GetTenantAccessInfos() { throw null; } public virtual Azure.Response GetTenantConfigurationSyncState(Azure.ResourceManager.ApiManagement.Models.ConfigurationName configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetTenantConfigurationSyncStateAsync(Azure.ResourceManager.ApiManagement.Models.ConfigurationName configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation MigrateToStv2(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> MigrateToStv2Async(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation PerformConnectivityCheckAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ConnectivityCheckContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> PerformConnectivityCheckAsyncAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ConnectivityCheckContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1953,6 +1985,10 @@ protected ApiResource() { } public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetOperationsByTags(string filter = null, int? top = default(int?), int? skip = default(int?), bool? includeNotTaggedOperations = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetOperationsByTagsAsync(string filter = null, int? top = default(int?), int? skip = default(int?), bool? includeNotTaggedOperations = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetResolverContract(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetResolverContractAsync(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ResolverContractCollection GetResolverContracts() { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceApiWikiResource GetServiceApiWiki() { throw null; } public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -2106,6 +2142,125 @@ protected ApiVersionSetResource() { } public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class AuthorizationAccessPolicyContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AuthorizationAccessPolicyContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string authorizationAccessPolicyId, Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string authorizationAccessPolicyId, Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class AuthorizationAccessPolicyContractData : Azure.ResourceManager.Models.ResourceData + { + public AuthorizationAccessPolicyContractData() { } + public string ObjectId { get { throw null; } set { } } + public System.Guid? TenantId { get { throw null; } set { } } + } + public partial class AuthorizationAccessPolicyContractResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AuthorizationAccessPolicyContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AuthorizationContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AuthorizationContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string authorizationId, Azure.ResourceManager.ApiManagement.AuthorizationContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string authorizationId, Azure.ResourceManager.ApiManagement.AuthorizationContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class AuthorizationContractData : Azure.ResourceManager.Models.ResourceData + { + public AuthorizationContractData() { } + public Azure.ResourceManager.ApiManagement.Models.AuthorizationType? AuthorizationType { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.AuthorizationError Error { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType? OAuth2GrantType { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Parameters { get { throw null; } } + public string Status { get { throw null; } set { } } + } + public partial class AuthorizationContractResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AuthorizationContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response ConfirmConsentCode(Azure.ResourceManager.ApiManagement.Models.AuthorizationConfirmConsentCodeRequestContract authorizationConfirmConsentCodeRequestContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ConfirmConsentCodeAsync(Azure.ResourceManager.ApiManagement.Models.AuthorizationConfirmConsentCodeRequestContract authorizationConfirmConsentCodeRequestContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAuthorizationAccessPolicyContract(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAuthorizationAccessPolicyContractAsync(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractCollection GetAuthorizationAccessPolicyContracts() { throw null; } + public virtual Azure.Response PostAuthorizationLoginLink(Azure.ResourceManager.ApiManagement.Models.AuthorizationLoginRequestContract authorizationLoginRequestContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PostAuthorizationLoginLinkAsync(Azure.ResourceManager.ApiManagement.Models.AuthorizationLoginRequestContract authorizationLoginRequestContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.AuthorizationContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.AuthorizationContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AuthorizationProviderContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AuthorizationProviderContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string authorizationProviderId, Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string authorizationProviderId, Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class AuthorizationProviderContractData : Azure.ResourceManager.Models.ResourceData + { + public AuthorizationProviderContractData() { } + public string DisplayName { get { throw null; } set { } } + public string IdentityProvider { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.AuthorizationProviderOAuth2Settings Oauth2 { get { throw null; } set { } } + } + public partial class AuthorizationProviderContractResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AuthorizationProviderContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAuthorizationContract(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAuthorizationContractAsync(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationContractCollection GetAuthorizationContracts() { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class DiagnosticContractData : Azure.ResourceManager.Models.ResourceData { public DiagnosticContractData() { } @@ -2120,6 +2275,43 @@ public DiagnosticContractData() { } public Azure.ResourceManager.ApiManagement.Models.SamplingSettings Sampling { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel? Verbosity { get { throw null; } set { } } } + public partial class DocumentationContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DocumentationContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string documentationId, Azure.ResourceManager.ApiManagement.DocumentationContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string documentationId, Azure.ResourceManager.ApiManagement.DocumentationContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DocumentationContractData : Azure.ResourceManager.Models.ResourceData + { + public DocumentationContractData() { } + public string Content { get { throw null; } set { } } + public string Title { get { throw null; } set { } } + } + public partial class DocumentationContractResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DocumentationContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.DocumentationContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string documentationId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.DocumentationContractPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.DocumentationContractPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class IssueContractData : Azure.ResourceManager.Models.ResourceData { public IssueContractData() { } @@ -2136,6 +2328,193 @@ public PolicyContractData() { } public Azure.ResourceManager.ApiManagement.Models.PolicyContentFormat? Format { get { throw null; } set { } } public string Value { get { throw null; } set { } } } + public partial class PolicyFragmentContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PolicyFragmentContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string id, Azure.ResourceManager.ApiManagement.PolicyFragmentContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string id, Azure.ResourceManager.ApiManagement.PolicyFragmentContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, string orderBy = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string orderBy = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class PolicyFragmentContractData : Azure.ResourceManager.Models.ResourceData + { + public PolicyFragmentContractData() { } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? Format { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + } + public partial class PolicyFragmentContractResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PolicyFragmentContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.PolicyFragmentContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string id) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetReferences(int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetReferencesAsync(int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.PolicyFragmentContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.PolicyFragmentContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class PortalConfigContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PortalConfigContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string portalConfigId, Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.PortalConfigContractData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string portalConfigId, Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.PortalConfigContractData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class PortalConfigContractData : Azure.ResourceManager.Models.ResourceData + { + public PortalConfigContractData() { } + public System.Collections.Generic.IList CorsAllowedOrigins { get { throw null; } } + public Azure.ResourceManager.ApiManagement.Models.PortalConfigCspProperties Csp { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.PortalConfigDelegationProperties Delegation { get { throw null; } set { } } + public bool? EnableBasicAuth { get { throw null; } set { } } + public bool? Require { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.PortalConfigTermsOfServiceProperties SignupTermsOfService { get { throw null; } set { } } + } + public partial class PortalConfigContractResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PortalConfigContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.PortalConfigContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.PortalConfigContractData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.PortalConfigContractData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ResolverContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ResolverContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string resolverId, Azure.ResourceManager.ApiManagement.ResolverContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string resolverId, Azure.ResourceManager.ApiManagement.ResolverContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ResolverContractData : Azure.ResourceManager.Models.ResourceData + { + public ResolverContractData() { } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public string Path { get { throw null; } set { } } + } + public partial class ResolverContractResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ResolverContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.ResolverContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceApiResolverPolicyCollection GetServiceApiResolverPolicies() { throw null; } + public virtual Azure.Response GetServiceApiResolverPolicy(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetServiceApiResolverPolicyAsync(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ResolverContractPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ResolverContractPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ServiceApiResolverPolicyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ServiceApiResolverPolicyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.PolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.PolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ServiceApiResolverPolicyResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceApiResolverPolicyResource() { } + public virtual Azure.ResourceManager.ApiManagement.PolicyContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, Azure.ResourceManager.ApiManagement.Models.PolicyName policyId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.PolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.PolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ServiceApiWikiResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceApiWikiResource() { } + public virtual Azure.ResourceManager.ApiManagement.WikiContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.WikiContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.WikiContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.WikiUpdateContract wikiUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.WikiUpdateContract wikiUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ServiceProductWikiResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceProductWikiResource() { } + public virtual Azure.ResourceManager.ApiManagement.WikiContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.WikiContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.WikiContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string productId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.WikiUpdateContract wikiUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.WikiUpdateContract wikiUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class SubscriptionContractData : Azure.ResourceManager.Models.ResourceData { public SubscriptionContractData() { } @@ -2216,6 +2595,11 @@ public UserContractData() { } public System.DateTimeOffset? RegistriesOn { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.ApiManagementUserState? State { get { throw null; } set { } } } + public partial class WikiContractData : Azure.ResourceManager.Models.ResourceData + { + public WikiContractData() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + } } namespace Azure.ResourceManager.ApiManagement.Models { @@ -2243,6 +2627,8 @@ public AdditionalLocation(Azure.Core.AzureLocation location, Azure.ResourceManag public bool? DisableGateway { get { throw null; } set { } } public System.Uri GatewayRegionalUri { get { throw null; } } public Azure.Core.AzureLocation Location { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.NatGatewayState? NatGatewayState { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList OutboundPublicIPAddresses { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.PlatformVersion? PlatformVersion { get { throw null; } } public System.Collections.Generic.IReadOnlyList PrivateIPAddresses { get { throw null; } } public System.Collections.Generic.IReadOnlyList PublicIPAddresses { get { throw null; } } @@ -2301,6 +2687,7 @@ public ApiCreateOrUpdateContent() { } public Azure.Core.ResourceIdentifier SourceApiId { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get { throw null; } set { } } public System.Uri TermsOfServiceUri { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct? TranslateRequiredQueryParametersConduct { get { throw null; } set { } } public string Value { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdatePropertiesWsdlSelector WsdlSelector { get { throw null; } set { } } } @@ -2364,6 +2751,8 @@ public ApiManagementAuthorizationServerPatch() { } public string ResourceOwnerUsername { get { throw null; } set { } } public System.Collections.Generic.IList TokenBodyParameters { get { throw null; } } public string TokenEndpoint { get { throw null; } set { } } + public bool? UseInApiDocumentation { get { throw null; } set { } } + public bool? UseInTestConsole { get { throw null; } set { } } } public partial class ApiManagementBackendPatch { @@ -2462,6 +2851,7 @@ public ApiManagementIdentityProviderCreateOrUpdateContent() { } public System.Collections.Generic.IList AllowedTenants { get { throw null; } } public string Authority { get { throw null; } set { } } public string ClientId { get { throw null; } set { } } + public string ClientLibrary { get { throw null; } set { } } public string ClientSecret { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? IdentityProviderType { get { throw null; } set { } } public string PasswordResetPolicyName { get { throw null; } set { } } @@ -2476,6 +2866,7 @@ public ApiManagementIdentityProviderPatch() { } public System.Collections.Generic.IList AllowedTenants { get { throw null; } } public string Authority { get { throw null; } set { } } public string ClientId { get { throw null; } set { } } + public string ClientLibrary { get { throw null; } set { } } public string ClientSecret { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? IdentityProviderType { get { throw null; } set { } } public string PasswordResetPolicyName { get { throw null; } set { } } @@ -2518,6 +2909,8 @@ public ApiManagementOpenIdConnectProviderPatch() { } public string Description { get { throw null; } set { } } public string DisplayName { get { throw null; } set { } } public string MetadataEndpoint { get { throw null; } set { } } + public bool? UseInApiDocumentation { get { throw null; } set { } } + public bool? UseInTestConsole { get { throw null; } set { } } } public partial class ApiManagementPrivateEndpointConnectionCreateOrUpdateContent { @@ -2674,7 +3067,9 @@ public ApiManagementServicePatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Uri ManagementApiUri { get { throw null; } } public string MinApiVersion { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.NatGatewayState? NatGatewayState { get { throw null; } set { } } public string NotificationSenderEmail { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList OutboundPublicIPAddresses { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.PlatformVersion? PlatformVersion { get { throw null; } } public System.Uri PortalUri { get { throw null; } } public System.Collections.Generic.IList PrivateEndpointConnections { get { throw null; } } @@ -3091,7 +3486,30 @@ public partial class AuthenticationSettingsContract { public AuthenticationSettingsContract() { } public Azure.ResourceManager.ApiManagement.Models.OAuth2AuthenticationSettingsContract OAuth2 { get { throw null; } set { } } + public System.Collections.Generic.IList OAuth2AuthenticationSettings { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.OpenIdAuthenticationSettingsContract OpenId { get { throw null; } set { } } + public System.Collections.Generic.IList OpenidAuthenticationSettings { get { throw null; } } + } + public partial class AuthorizationConfirmConsentCodeRequestContract + { + public AuthorizationConfirmConsentCodeRequestContract() { } + public string ConsentCode { get { throw null; } set { } } + } + public partial class AuthorizationError + { + public AuthorizationError() { } + public string Code { get { throw null; } set { } } + public string Message { get { throw null; } set { } } + } + public partial class AuthorizationLoginRequestContract + { + public AuthorizationLoginRequestContract() { } + public System.Uri PostLoginRedirectUri { get { throw null; } set { } } + } + public partial class AuthorizationLoginResponseContract + { + internal AuthorizationLoginResponseContract() { } + public string LoginLink { get { throw null; } } } public enum AuthorizationMethod { @@ -3104,6 +3522,18 @@ public enum AuthorizationMethod Patch = 6, Delete = 7, } + public partial class AuthorizationProviderOAuth2GrantTypes + { + public AuthorizationProviderOAuth2GrantTypes() { } + public System.Collections.Generic.IDictionary AuthorizationCode { get { throw null; } } + public System.Collections.Generic.IDictionary ClientCredentials { get { throw null; } } + } + public partial class AuthorizationProviderOAuth2Settings + { + public AuthorizationProviderOAuth2Settings() { } + public Azure.ResourceManager.ApiManagement.Models.AuthorizationProviderOAuth2GrantTypes GrantTypes { get { throw null; } set { } } + public System.Uri RedirectUri { get { throw null; } set { } } + } public partial class AuthorizationServerSecretsContract { internal AuthorizationServerSecretsContract() { } @@ -3111,6 +3541,23 @@ internal AuthorizationServerSecretsContract() { } public string ResourceOwnerPassword { get { throw null; } } public string ResourceOwnerUsername { get { throw null; } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AuthorizationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AuthorizationType(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.AuthorizationType OAuth2 { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.AuthorizationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ApiManagement.Models.AuthorizationType left, Azure.ResourceManager.ApiManagement.Models.AuthorizationType right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.AuthorizationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.AuthorizationType left, Azure.ResourceManager.ApiManagement.Models.AuthorizationType right) { throw null; } + public override string ToString() { throw null; } + } public partial class AvailableApiManagementServiceSkuResult { internal AvailableApiManagementServiceSkuResult() { } @@ -3522,6 +3969,12 @@ public DataMaskingEntity() { } public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.DataMaskingMode left, Azure.ResourceManager.ApiManagement.Models.DataMaskingMode right) { throw null; } public override string ToString() { throw null; } } + public partial class DocumentationContractPatch + { + public DocumentationContractPatch() { } + public string Content { get { throw null; } set { } } + public string Title { get { throw null; } set { } } + } public partial class EmailTemplateParametersContractProperties { public EmailTemplateParametersContractProperties() { } @@ -3885,6 +4338,24 @@ public partial class NamedValueSecretContract internal NamedValueSecretContract() { } public string Value { get { throw null; } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NatGatewayState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NatGatewayState(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.NatGatewayState Disabled { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.NatGatewayState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.NatGatewayState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ApiManagement.Models.NatGatewayState left, Azure.ResourceManager.ApiManagement.Models.NatGatewayState right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.NatGatewayState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.NatGatewayState left, Azure.ResourceManager.ApiManagement.Models.NatGatewayState right) { throw null; } + public override string ToString() { throw null; } + } public partial class NetworkStatusContract { internal NetworkStatusContract() { } @@ -3926,6 +4397,24 @@ public OAuth2AuthenticationSettingsContract() { } public string AuthorizationServerId { get { throw null; } set { } } public string Scope { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OAuth2GrantType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OAuth2GrantType(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType AuthorizationCode { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType ClientCredentials { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType left, Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType left, Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType right) { throw null; } + public override string ToString() { throw null; } + } public partial class OpenIdAuthenticationSettingsContract { public OpenIdAuthenticationSettingsContract() { } @@ -4055,6 +4544,24 @@ public PolicyDescriptionContractData() { } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PolicyFragmentContentFormat : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PolicyFragmentContentFormat(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat Rawxml { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat Xml { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat left, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat left, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PolicyName : System.IEquatable { private readonly object _dummy; @@ -4079,6 +4586,27 @@ public enum PolicyScopeContract Operation = 3, All = 4, } + public partial class PortalConfigCspProperties + { + public PortalConfigCspProperties() { } + public System.Collections.Generic.IList AllowedSources { get { throw null; } } + public Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode? Mode { get { throw null; } set { } } + public System.Collections.Generic.IList ReportUri { get { throw null; } } + } + public partial class PortalConfigDelegationProperties + { + public PortalConfigDelegationProperties() { } + public bool? DelegateRegistration { get { throw null; } set { } } + public bool? DelegateSubscription { get { throw null; } set { } } + public System.Uri DelegationUri { get { throw null; } set { } } + public string ValidationKey { get { throw null; } set { } } + } + public partial class PortalConfigTermsOfServiceProperties + { + public PortalConfigTermsOfServiceProperties() { } + public bool? RequireConsent { get { throw null; } set { } } + public string Text { get { throw null; } set { } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PortalRevisionStatus : System.IEquatable { @@ -4109,6 +4637,25 @@ public PortalSettingsContractData() { } public System.Uri Uri { get { throw null; } set { } } public string ValidationKey { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PortalSettingsCspMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PortalSettingsCspMode(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode Disabled { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode Enabled { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode ReportOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode left, Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode left, Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode right) { throw null; } + public override string ToString() { throw null; } + } public partial class PortalSettingValidationKeyContract { internal PortalSettingValidationKeyContract() { } @@ -4317,6 +4864,17 @@ internal RequestReportRecordContract() { } public System.Uri Uri { get { throw null; } } public string UserId { get { throw null; } } } + public partial class ResolverContractPatch + { + public ResolverContractPatch() { } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public string Path { get { throw null; } set { } } + } + public partial class ResourceCollectionValueItem : Azure.ResourceManager.Models.ResourceData + { + public ResourceCollectionValueItem() { } + } public partial class ResourceLocationDataContract { public ResourceLocationDataContract(string name) { } @@ -4542,6 +5100,24 @@ public enum TokenGenerationUsedKeyType public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel left, Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TranslateRequiredQueryParametersConduct : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TranslateRequiredQueryParametersConduct(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct Query { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct Template { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct left, Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct left, Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct right) { throw null; } + public override string ToString() { throw null; } + } public partial class UserIdentityContract { public UserIdentityContract() { } @@ -4604,6 +5180,16 @@ public VirtualNetworkConfiguration() { } public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType left, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType right) { throw null; } public override string ToString() { throw null; } } + public partial class WikiDocumentationContract + { + public WikiDocumentationContract() { } + public string DocumentationId { get { throw null; } set { } } + } + public partial class WikiUpdateContract + { + public WikiUpdateContract() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + } public partial class X509CertificateName { public X509CertificateName() { } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.cs index 5598cd1cbd7b6..73fd12cc8b27c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.cs @@ -44,12 +44,14 @@ public ApiManagementAuthorizationServerData() /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. /// User-friendly authorization server name. + /// If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. + /// If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. /// Form of an authorization grant, which the client uses to request the access token. /// Client or app id registered with this authorization server. /// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. - internal ApiManagementAuthorizationServerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, IList authorizationMethods, IList clientAuthenticationMethods, IList tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, IList bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, string clientRegistrationEndpoint, string authorizationEndpoint, IList grantTypes, string clientId, string clientSecret) : base(id, name, resourceType, systemData) + internal ApiManagementAuthorizationServerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, IList authorizationMethods, IList clientAuthenticationMethods, IList tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, IList bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, bool? useInTestConsole, bool? useInApiDocumentation, string clientRegistrationEndpoint, string authorizationEndpoint, IList grantTypes, string clientId, string clientSecret) : base(id, name, resourceType, systemData) { Description = description; AuthorizationMethods = authorizationMethods; @@ -62,6 +64,8 @@ internal ApiManagementAuthorizationServerData(ResourceIdentifier id, string name ResourceOwnerUsername = resourceOwnerUsername; ResourceOwnerPassword = resourceOwnerPassword; DisplayName = displayName; + UseInTestConsole = useInTestConsole; + UseInApiDocumentation = useInApiDocumentation; ClientRegistrationEndpoint = clientRegistrationEndpoint; AuthorizationEndpoint = authorizationEndpoint; GrantTypes = grantTypes; @@ -91,6 +95,10 @@ internal ApiManagementAuthorizationServerData(ResourceIdentifier id, string name public string ResourceOwnerPassword { get; set; } /// User-friendly authorization server name. public string DisplayName { get; set; } + /// If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. + public bool? UseInTestConsole { get; set; } + /// If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. + public bool? UseInApiDocumentation { get; set; } /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. public string ClientRegistrationEndpoint { get; set; } /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.cs index 077d2b7296d9b..203dcfe698467 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.cs @@ -30,10 +30,10 @@ public ApiManagementBackendData() /// The systemData. /// Backend Title. /// Backend Description. - /// Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. + /// Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. /// Backend Properties contract. /// Backend Credentials Contract Properties. - /// Backend Proxy Contract Properties. + /// Backend gateway Contract Properties. /// Backend TLS Properties. /// Runtime Url of the Backend. /// Backend communication protocol. @@ -54,7 +54,7 @@ internal ApiManagementBackendData(ResourceIdentifier id, string name, ResourceTy public string Title { get; set; } /// Backend Description. public string Description { get; set; } - /// Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. + /// Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. public Uri ResourceUri { get; set; } /// Backend Properties contract. internal BackendProperties Properties { get; set; } @@ -72,7 +72,7 @@ public BackendServiceFabricClusterProperties BackendServiceFabricCluster /// Backend Credentials Contract Properties. public BackendCredentialsContract Credentials { get; set; } - /// Backend Proxy Contract Properties. + /// Backend gateway Contract Properties. public BackendProxyContract Proxy { get; set; } /// Backend TLS Properties. public BackendTlsProperties Tls { get; set; } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.cs index 6fe935696defd..0e26ad5302601 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.cs @@ -292,7 +292,7 @@ public virtual Response Update(ETag ifMatch, ApiMa } /// - /// Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. + /// Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. /// /// /// Request Path @@ -323,7 +323,7 @@ public virtual async Task ReconnectAsync(BackendReconnectContract back } /// - /// Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. + /// Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. /// /// /// Request Path diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.cs index ca8db35f24689..6b1e104d11816 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.cs @@ -37,9 +37,10 @@ public ApiManagementIdentityProviderData() /// Signin Policy Name. Only applies to AAD B2C Identity Provider. /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. - internal ApiManagementIdentityProviderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IdentityProviderType? identityProviderType, string signInTenant, IList allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientId, string clientSecret) : base(id, name, resourceType, systemData) + internal ApiManagementIdentityProviderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IdentityProviderType? identityProviderType, string signInTenant, IList allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientLibrary, string clientId, string clientSecret) : base(id, name, resourceType, systemData) { IdentityProviderType = identityProviderType; SignInTenant = signInTenant; @@ -49,6 +50,7 @@ internal ApiManagementIdentityProviderData(ResourceIdentifier id, string name, R SignInPolicyName = signInPolicyName; ProfileEditingPolicyName = profileEditingPolicyName; PasswordResetPolicyName = passwordResetPolicyName; + ClientLibrary = clientLibrary; ClientId = clientId; ClientSecret = clientSecret; } @@ -69,6 +71,8 @@ internal ApiManagementIdentityProviderData(ResourceIdentifier id, string name, R public string ProfileEditingPolicyName { get; set; } /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. public string PasswordResetPolicyName { get; set; } + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. + public string ClientLibrary { get; set; } /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. public string ClientId { get; set; } /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.cs index 27c2aa10da602..aa49092ff1b02 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.cs @@ -31,13 +31,17 @@ public ApiManagementOpenIdConnectProviderData() /// Metadata endpoint URI. /// Client ID of developer console which is the client application. /// Client Secret of developer console which is the client application. - internal ApiManagementOpenIdConnectProviderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, string description, string metadataEndpoint, string clientId, string clientSecret) : base(id, name, resourceType, systemData) + /// If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. + /// If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. + internal ApiManagementOpenIdConnectProviderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, string description, string metadataEndpoint, string clientId, string clientSecret, bool? useInTestConsole, bool? useInApiDocumentation) : base(id, name, resourceType, systemData) { DisplayName = displayName; Description = description; MetadataEndpoint = metadataEndpoint; ClientId = clientId; ClientSecret = clientSecret; + UseInTestConsole = useInTestConsole; + UseInApiDocumentation = useInApiDocumentation; } /// User-friendly OpenID Connect Provider name. @@ -50,5 +54,9 @@ internal ApiManagementOpenIdConnectProviderData(ResourceIdentifier id, string na public string ClientId { get; set; } /// Client Secret of developer console which is the client application. public string ClientSecret { get; set; } + /// If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. + public bool? UseInTestConsole { get; set; } + /// If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. + public bool? UseInApiDocumentation { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.cs index 938ddf58678b9..9307d4dbde677 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.cs @@ -203,6 +203,13 @@ public virtual Response GetApiManagementProduct return GetApiManagementProductTags().Get(tagId, cancellationToken); } + /// Gets an object representing a ServiceProductWikiResource along with the instance operations that can be performed on it in the ApiManagementProduct. + /// Returns a object. + public virtual ServiceProductWikiResource GetServiceProductWiki() + { + return new ServiceProductWikiResource(Client, Id.AppendChildResource("wikis", "default")); + } + /// /// Gets the details of the product specified by its identifier. /// diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.cs index 0f3b03ad24e22..030a38c080c07 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.cs @@ -41,6 +41,7 @@ public ApiManagementServiceData(AzureLocation location, ApiManagementServiceSkuP AdditionalLocations = new ChangeTrackingList(); CustomProperties = new ChangeTrackingDictionary(); Certificates = new ChangeTrackingList(); + OutboundPublicIPAddresses = new ChangeTrackingList(); PrivateEndpointConnections = new ChangeTrackingList(); PublisherEmail = publisherEmail; PublisherName = publisherName; @@ -74,9 +75,11 @@ public ApiManagementServiceData(AzureLocation location, ApiManagementServiceSkuP /// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Virtual network configuration of the API Management service. /// Additional datacenter locations of the API Management service. - /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.</br> Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + /// Property can be used to enable NAT Gateway for this API Management service. + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. /// Control Plane Apis version constraint for the API Management service. @@ -85,7 +88,7 @@ public ApiManagementServiceData(AzureLocation location, ApiManagementServiceSkuP /// Compute Platform Version running the service in this location. /// Publisher email. /// Publisher name. - internal ApiManagementServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ApiManagementServiceSkuProperties sku, ManagedServiceIdentity identity, ETag? etag, IList zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, DateTimeOffset? createdAtUtc, Uri gatewayUri, Uri gatewayRegionalUri, Uri portalUri, Uri managementApiUri, Uri scmUri, Uri developerPortalUri, IList hostnameConfigurations, IReadOnlyList publicIPAddresses, IReadOnlyList privateIPAddresses, ResourceIdentifier publicIPAddressId, PublicNetworkAccess? publicNetworkAccess, VirtualNetworkConfiguration virtualNetworkConfiguration, IList additionalLocations, IDictionary customProperties, IList certificates, bool? enableClientCertificate, bool? disableGateway, VirtualNetworkType? virtualNetworkType, ApiVersionConstraint apiVersionConstraint, bool? restore, IList privateEndpointConnections, PlatformVersion? platformVersion, string publisherEmail, string publisherName) : base(id, name, resourceType, systemData, tags, location) + internal ApiManagementServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ApiManagementServiceSkuProperties sku, ManagedServiceIdentity identity, ETag? etag, IList zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, DateTimeOffset? createdAtUtc, Uri gatewayUri, Uri gatewayRegionalUri, Uri portalUri, Uri managementApiUri, Uri scmUri, Uri developerPortalUri, IList hostnameConfigurations, IReadOnlyList publicIPAddresses, IReadOnlyList privateIPAddresses, ResourceIdentifier publicIPAddressId, PublicNetworkAccess? publicNetworkAccess, VirtualNetworkConfiguration virtualNetworkConfiguration, IList additionalLocations, IDictionary customProperties, IList certificates, bool? enableClientCertificate, NatGatewayState? natGatewayState, IReadOnlyList outboundPublicIPAddresses, bool? disableGateway, VirtualNetworkType? virtualNetworkType, ApiVersionConstraint apiVersionConstraint, bool? restore, IList privateEndpointConnections, PlatformVersion? platformVersion, string publisherEmail, string publisherName) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Identity = identity; @@ -111,6 +114,8 @@ internal ApiManagementServiceData(ResourceIdentifier id, string name, ResourceTy CustomProperties = customProperties; Certificates = certificates; EnableClientCertificate = enableClientCertificate; + NatGatewayState = natGatewayState; + OutboundPublicIPAddresses = outboundPublicIPAddresses; DisableGateway = disableGateway; VirtualNetworkType = virtualNetworkType; ApiVersionConstraint = apiVersionConstraint; @@ -163,12 +168,16 @@ internal ApiManagementServiceData(ResourceIdentifier id, string name, ResourceTy public VirtualNetworkConfiguration VirtualNetworkConfiguration { get; set; } /// Additional datacenter locations of the API Management service. public IList AdditionalLocations { get; } - /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.</br> Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. public IDictionary CustomProperties { get; } /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. public IList Certificates { get; } /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. public bool? EnableClientCertificate { get; set; } + /// Property can be used to enable NAT Gateway for this API Management service. + public NatGatewayState? NatGatewayState { get; set; } + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. + public IReadOnlyList OutboundPublicIPAddresses { get; } /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. public bool? DisableGateway { get; set; } /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.cs index d66c4e91f8cdf..16d650d608d24 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.cs @@ -525,6 +525,59 @@ public virtual Response GetApiManageme return GetApiManagementAuthorizationServers().Get(authsid, cancellationToken); } + /// Gets a collection of AuthorizationProviderContractResources in the ApiManagementService. + /// An object representing collection of AuthorizationProviderContractResources and their operations over a AuthorizationProviderContractResource. + public virtual AuthorizationProviderContractCollection GetAuthorizationProviderContracts() + { + return GetCachedClient(Client => new AuthorizationProviderContractCollection(Client, Id)); + } + + /// + /// Gets the details of the authorization provider specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetAuthorizationProviderContractAsync(string authorizationProviderId, CancellationToken cancellationToken = default) + { + return await GetAuthorizationProviderContracts().GetAsync(authorizationProviderId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the authorization provider specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetAuthorizationProviderContract(string authorizationProviderId, CancellationToken cancellationToken = default) + { + return GetAuthorizationProviderContracts().Get(authorizationProviderId, cancellationToken); + } + /// Gets a collection of ApiManagementBackendResources in the ApiManagementService. /// An object representing collection of ApiManagementBackendResources and their operations over a ApiManagementBackendResource. public virtual ApiManagementBackendCollection GetApiManagementBackends() @@ -1096,6 +1149,114 @@ public virtual Response GetApiManage return GetApiManagementOpenIdConnectProviders().Get(openId, cancellationToken); } + /// Gets a collection of PolicyFragmentContractResources in the ApiManagementService. + /// An object representing collection of PolicyFragmentContractResources and their operations over a PolicyFragmentContractResource. + public virtual PolicyFragmentContractCollection GetPolicyFragmentContracts() + { + return GetCachedClient(Client => new PolicyFragmentContractCollection(Client, Id)); + } + + /// + /// Gets a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetPolicyFragmentContractAsync(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + return await GetPolicyFragmentContracts().GetAsync(id, format, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetPolicyFragmentContract(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + return GetPolicyFragmentContracts().Get(id, format, cancellationToken); + } + + /// Gets a collection of PortalConfigContractResources in the ApiManagementService. + /// An object representing collection of PortalConfigContractResources and their operations over a PortalConfigContractResource. + public virtual PortalConfigContractCollection GetPortalConfigContracts() + { + return GetCachedClient(Client => new PortalConfigContractCollection(Client, Id)); + } + + /// + /// Get the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetPortalConfigContractAsync(string portalConfigId, CancellationToken cancellationToken = default) + { + return await GetPortalConfigContracts().GetAsync(portalConfigId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetPortalConfigContract(string portalConfigId, CancellationToken cancellationToken = default) + { + return GetPortalConfigContracts().Get(portalConfigId, cancellationToken); + } + /// Gets a collection of ApiManagementPortalRevisionResources in the ApiManagementService. /// An object representing collection of ApiManagementPortalRevisionResources and their operations over a ApiManagementPortalRevisionResource. public virtual ApiManagementPortalRevisionCollection GetApiManagementPortalRevisions() @@ -1586,6 +1747,59 @@ public virtual Response GetApiManagementUser(string u return GetApiManagementUsers().Get(userId, cancellationToken); } + /// Gets a collection of DocumentationContractResources in the ApiManagementService. + /// An object representing collection of DocumentationContractResources and their operations over a DocumentationContractResource. + public virtual DocumentationContractCollection GetDocumentationContracts() + { + return GetCachedClient(Client => new DocumentationContractCollection(Client, Id)); + } + + /// + /// Gets the details of the Documentation specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetDocumentationContractAsync(string documentationId, CancellationToken cancellationToken = default) + { + return await GetDocumentationContracts().GetAsync(documentationId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the Documentation specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetDocumentationContract(string documentationId, CancellationToken cancellationToken = default) + { + return GetDocumentationContracts().Get(documentationId, cancellationToken); + } + /// /// Gets an API Management service resource description. /// @@ -2050,19 +2264,21 @@ public virtual Response GetContentType(string contentT /// /// /// Content type identifier. + /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> CreateOrUpdateContentTypeAsync(string contentTypeId, ETag? ifMatch = null, CancellationToken cancellationToken = default) + /// or is null. + public virtual async Task> CreateOrUpdateContentTypeAsync(string contentTypeId, ApiManagementContentType apiManagementContentType, ETag? ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(contentTypeId, nameof(contentTypeId)); + Argument.AssertNotNull(apiManagementContentType, nameof(apiManagementContentType)); using var scope = _contentTypeClientDiagnostics.CreateScope("ApiManagementServiceResource.CreateOrUpdateContentType"); scope.Start(); try { - var response = await _contentTypeRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, contentTypeId, ifMatch, cancellationToken).ConfigureAwait(false); + var response = await _contentTypeRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, contentTypeId, apiManagementContentType, ifMatch, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -2086,19 +2302,21 @@ public virtual async Task> CreateOrUpdateCont /// /// /// Content type identifier. + /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response CreateOrUpdateContentType(string contentTypeId, ETag? ifMatch = null, CancellationToken cancellationToken = default) + /// or is null. + public virtual Response CreateOrUpdateContentType(string contentTypeId, ApiManagementContentType apiManagementContentType, ETag? ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(contentTypeId, nameof(contentTypeId)); + Argument.AssertNotNull(apiManagementContentType, nameof(apiManagementContentType)); using var scope = _contentTypeClientDiagnostics.CreateScope("ApiManagementServiceResource.CreateOrUpdateContentType"); scope.Start(); try { - var response = _contentTypeRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, contentTypeId, ifMatch, cancellationToken); + var response = _contentTypeRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, contentTypeId, apiManagementContentType, ifMatch, cancellationToken); return response; } catch (Exception e) @@ -2397,20 +2615,22 @@ public virtual Response GetContentItem(string contentT /// /// Content type identifier. /// Content item identifier. + /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. /// The cancellation token to use. /// or is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateContentItemAsync(string contentTypeId, string contentItemId, ETag? ifMatch = null, CancellationToken cancellationToken = default) + /// , or is null. + public virtual async Task> CreateOrUpdateContentItemAsync(string contentTypeId, string contentItemId, ApiManagementContentItem apiManagementContentItem, ETag? ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(contentTypeId, nameof(contentTypeId)); Argument.AssertNotNullOrEmpty(contentItemId, nameof(contentItemId)); + Argument.AssertNotNull(apiManagementContentItem, nameof(apiManagementContentItem)); using var scope = _contentItemClientDiagnostics.CreateScope("ApiManagementServiceResource.CreateOrUpdateContentItem"); scope.Start(); try { - var response = await _contentItemRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, contentTypeId, contentItemId, ifMatch, cancellationToken).ConfigureAwait(false); + var response = await _contentItemRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, contentTypeId, contentItemId, apiManagementContentItem, ifMatch, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -2435,20 +2655,22 @@ public virtual async Task> CreateOrUpdateCont /// /// Content type identifier. /// Content item identifier. + /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. /// The cancellation token to use. /// or is an empty string, and was expected to be non-empty. - /// or is null. - public virtual Response CreateOrUpdateContentItem(string contentTypeId, string contentItemId, ETag? ifMatch = null, CancellationToken cancellationToken = default) + /// , or is null. + public virtual Response CreateOrUpdateContentItem(string contentTypeId, string contentItemId, ApiManagementContentItem apiManagementContentItem, ETag? ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(contentTypeId, nameof(contentTypeId)); Argument.AssertNotNullOrEmpty(contentItemId, nameof(contentItemId)); + Argument.AssertNotNull(apiManagementContentItem, nameof(apiManagementContentItem)); using var scope = _contentItemClientDiagnostics.CreateScope("ApiManagementServiceResource.CreateOrUpdateContentItem"); scope.Start(); try { - var response = _contentItemRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, contentTypeId, contentItemId, ifMatch, cancellationToken); + var response = _contentItemRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, contentTypeId, contentItemId, apiManagementContentItem, ifMatch, cancellationToken); return response; } catch (Exception e) @@ -2730,6 +2952,74 @@ public virtual ArmOperation Backup(WaitUntil waitU } } + /// + /// Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/migrateToStv2 + /// + /// + /// Operation Id + /// ApiManagementService_MigrateToStv2 + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> MigrateToStv2Async(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _apiManagementServiceClientDiagnostics.CreateScope("ApiManagementServiceResource.MigrateToStv2"); + scope.Start(); + try + { + var response = await _apiManagementServiceRestClient.MigrateToStv2Async(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(new ApiManagementServiceOperationSource(Client), _apiManagementServiceClientDiagnostics, Pipeline, _apiManagementServiceRestClient.CreateMigrateToStv2Request(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/migrateToStv2 + /// + /// + /// Operation Id + /// ApiManagementService_MigrateToStv2 + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation MigrateToStv2(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _apiManagementServiceClientDiagnostics.CreateScope("ApiManagementServiceResource.MigrateToStv2"); + scope.Start(); + try + { + var response = _apiManagementServiceRestClient.MigrateToStv2(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ApiManagementArmOperation(new ApiManagementServiceOperationSource(Client), _apiManagementServiceClientDiagnostics, Pipeline, _apiManagementServiceRestClient.CreateMigrateToStv2Request(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. /// diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.cs index aae52d4b3addc..6fa286d7c6ac1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.cs @@ -309,6 +309,59 @@ public virtual Response GetApiTag(string tagId, CancellationToke return GetApiTags().Get(tagId, cancellationToken); } + /// Gets a collection of ResolverContractResources in the Api. + /// An object representing collection of ResolverContractResources and their operations over a ResolverContractResource. + public virtual ResolverContractCollection GetResolverContracts() + { + return GetCachedClient(Client => new ResolverContractCollection(Client, Id)); + } + + /// + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetResolverContractAsync(string resolverId, CancellationToken cancellationToken = default) + { + return await GetResolverContracts().GetAsync(resolverId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetResolverContract(string resolverId, CancellationToken cancellationToken = default) + { + return GetResolverContracts().Get(resolverId, cancellationToken); + } + /// Gets a collection of ApiSchemaResources in the Api. /// An object representing collection of ApiSchemaResources and their operations over a ApiSchemaResource. public virtual ApiSchemaCollection GetApiSchemas() @@ -523,6 +576,13 @@ public virtual Response GetApiTagDescription(string t return GetApiTagDescriptions().Get(tagDescriptionId, cancellationToken); } + /// Gets an object representing a ServiceApiWikiResource along with the instance operations that can be performed on it in the Api. + /// Returns a object. + public virtual ServiceApiWikiResource GetServiceApiWiki() + { + return new ServiceApiWikiResource(Client, Id.AppendChildResource("wikis", "default")); + } + /// /// Gets the details of the API specified by its identifier. /// diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractCollection.cs new file mode 100644 index 0000000000000..ab234f8b2d4e9 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractCollection.cs @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAuthorizationAccessPolicyContracts method from an instance of . + /// + public partial class AuthorizationAccessPolicyContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics; + private readonly AuthorizationAccessPolicyRestOperations _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient; + + /// Initializes a new instance of the class for mocking. + protected AuthorizationAccessPolicyContractCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal AuthorizationAccessPolicyContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", AuthorizationAccessPolicyContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AuthorizationAccessPolicyContractResource.ResourceType, out string authorizationAccessPolicyContractAuthorizationAccessPolicyApiVersion); + _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient = new AuthorizationAccessPolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, authorizationAccessPolicyContractAuthorizationAccessPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != AuthorizationContractResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AuthorizationContractResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates Authorization Access Policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Identifier of the authorization access policy. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string authorizationAccessPolicyId, AuthorizationAccessPolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates Authorization Access Policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Identifier of the authorization access policy. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string authorizationAccessPolicyId, AuthorizationAccessPolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, data, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization access policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.Get"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization access policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.Get"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists a collection of authorization access policy defined within a authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_ListByAuthorization + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateListByAuthorizationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateListByAuthorizationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, filter, top, skip); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AuthorizationAccessPolicyContractResource(Client, AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(e)), _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics, Pipeline, "AuthorizationAccessPolicyContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists a collection of authorization access policy defined within a authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_ListByAuthorization + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateListByAuthorizationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateListByAuthorizationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, filter, top, skip); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AuthorizationAccessPolicyContractResource(Client, AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(e)), _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics, Pipeline, "AuthorizationAccessPolicyContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.Exists"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.Exists"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.cs new file mode 100644 index 0000000000000..f7e745f4e1f5b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the AuthorizationAccessPolicyContract data model. + /// Authorization access policy contract. + /// + public partial class AuthorizationAccessPolicyContractData : ResourceData + { + /// Initializes a new instance of AuthorizationAccessPolicyContractData. + public AuthorizationAccessPolicyContractData() + { + } + + /// Initializes a new instance of AuthorizationAccessPolicyContractData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The Tenant Id. + /// The Object Id. + internal AuthorizationAccessPolicyContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, Guid? tenantId, string objectId) : base(id, name, resourceType, systemData) + { + TenantId = tenantId; + ObjectId = objectId; + } + + /// The Tenant Id. + public Guid? TenantId { get; set; } + /// The Object Id. + public string ObjectId { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.cs new file mode 100644 index 0000000000000..f1622f47a36dd --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.cs @@ -0,0 +1,301 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing an AuthorizationAccessPolicyContract along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAuthorizationAccessPolicyContractResource method. + /// Otherwise you can get one from its parent resource using the GetAuthorizationAccessPolicyContract method. + /// + public partial class AuthorizationAccessPolicyContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics; + private readonly AuthorizationAccessPolicyRestOperations _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient; + private readonly AuthorizationAccessPolicyContractData _data; + + /// Initializes a new instance of the class for mocking. + protected AuthorizationAccessPolicyContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AuthorizationAccessPolicyContractResource(ArmClient client, AuthorizationAccessPolicyContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal AuthorizationAccessPolicyContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string authorizationAccessPolicyContractAuthorizationAccessPolicyApiVersion); + _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient = new AuthorizationAccessPolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, authorizationAccessPolicyContractAuthorizationAccessPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/authorizationProviders/authorizations/accessPolicies"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual AuthorizationAccessPolicyContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the authorization access policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractResource.Get"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization access policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractResource.Get"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific access policy from the Authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractResource.Delete"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific access policy from the Authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractResource.Delete"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates Authorization Access Policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AuthorizationAccessPolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractResource.Update"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates Authorization Access Policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, AuthorizationAccessPolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractResource.Update"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractCollection.cs new file mode 100644 index 0000000000000..7cef891e0160e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractCollection.cs @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAuthorizationContracts method from an instance of . + /// + public partial class AuthorizationContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _authorizationContractAuthorizationClientDiagnostics; + private readonly AuthorizationRestOperations _authorizationContractAuthorizationRestClient; + + /// Initializes a new instance of the class for mocking. + protected AuthorizationContractCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal AuthorizationContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _authorizationContractAuthorizationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", AuthorizationContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AuthorizationContractResource.ResourceType, out string authorizationContractAuthorizationApiVersion); + _authorizationContractAuthorizationRestClient = new AuthorizationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, authorizationContractAuthorizationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != AuthorizationProviderContractResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AuthorizationProviderContractResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Identifier of the authorization. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string authorizationId, AuthorizationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationContractResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Identifier of the authorization. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string authorizationId, AuthorizationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, data, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationContractResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.Get"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.Get"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists a collection of authorization providers defined within a authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations + /// + /// + /// Operation Id + /// Authorization_ListByAuthorizationProvider + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _authorizationContractAuthorizationRestClient.CreateListByAuthorizationProviderRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _authorizationContractAuthorizationRestClient.CreateListByAuthorizationProviderNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AuthorizationContractResource(Client, AuthorizationContractData.DeserializeAuthorizationContractData(e)), _authorizationContractAuthorizationClientDiagnostics, Pipeline, "AuthorizationContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists a collection of authorization providers defined within a authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations + /// + /// + /// Operation Id + /// Authorization_ListByAuthorizationProvider + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _authorizationContractAuthorizationRestClient.CreateListByAuthorizationProviderRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _authorizationContractAuthorizationRestClient.CreateListByAuthorizationProviderNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AuthorizationContractResource(Client, AuthorizationContractData.DeserializeAuthorizationContractData(e)), _authorizationContractAuthorizationClientDiagnostics, Pipeline, "AuthorizationContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.Exists"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.Exists"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractData.cs new file mode 100644 index 0000000000000..d5b912d4f27dc --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractData.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the AuthorizationContract data model. + /// Authorization contract. + /// + public partial class AuthorizationContractData : ResourceData + { + /// Initializes a new instance of AuthorizationContractData. + public AuthorizationContractData() + { + Parameters = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of AuthorizationContractData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Authorization type options. + /// OAuth2 grant type options. + /// Authorization parameters. + /// Authorization error details. + /// Status of the Authorization. + internal AuthorizationContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AuthorizationType? authorizationType, OAuth2GrantType? oAuth2GrantType, IDictionary parameters, AuthorizationError error, string status) : base(id, name, resourceType, systemData) + { + AuthorizationType = authorizationType; + OAuth2GrantType = oAuth2GrantType; + Parameters = parameters; + Error = error; + Status = status; + } + + /// Authorization type options. + public AuthorizationType? AuthorizationType { get; set; } + /// OAuth2 grant type options. + public OAuth2GrantType? OAuth2GrantType { get; set; } + /// Authorization parameters. + public IDictionary Parameters { get; } + /// Authorization error details. + public AuthorizationError Error { get; set; } + /// Status of the Authorization. + public string Status { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.cs new file mode 100644 index 0000000000000..368365144352a --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.cs @@ -0,0 +1,495 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing an AuthorizationContract along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAuthorizationContractResource method. + /// Otherwise you can get one from its parent resource using the GetAuthorizationContract method. + /// + public partial class AuthorizationContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _authorizationContractAuthorizationClientDiagnostics; + private readonly AuthorizationRestOperations _authorizationContractAuthorizationRestClient; + private readonly ClientDiagnostics _authorizationLoginLinksClientDiagnostics; + private readonly AuthorizationLoginLinksRestOperations _authorizationLoginLinksRestClient; + private readonly AuthorizationContractData _data; + + /// Initializes a new instance of the class for mocking. + protected AuthorizationContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AuthorizationContractResource(ArmClient client, AuthorizationContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal AuthorizationContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _authorizationContractAuthorizationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string authorizationContractAuthorizationApiVersion); + _authorizationContractAuthorizationRestClient = new AuthorizationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, authorizationContractAuthorizationApiVersion); + _authorizationLoginLinksClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _authorizationLoginLinksRestClient = new AuthorizationLoginLinksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/authorizationProviders/authorizations"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual AuthorizationContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of AuthorizationAccessPolicyContractResources in the AuthorizationContract. + /// An object representing collection of AuthorizationAccessPolicyContractResources and their operations over a AuthorizationAccessPolicyContractResource. + public virtual AuthorizationAccessPolicyContractCollection GetAuthorizationAccessPolicyContracts() + { + return GetCachedClient(Client => new AuthorizationAccessPolicyContractCollection(Client, Id)); + } + + /// + /// Gets the details of the authorization access policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetAuthorizationAccessPolicyContractAsync(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + return await GetAuthorizationAccessPolicyContracts().GetAsync(authorizationAccessPolicyId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the authorization access policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetAuthorizationAccessPolicyContract(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + return GetAuthorizationAccessPolicyContracts().Get(authorizationAccessPolicyId, cancellationToken); + } + + /// + /// Gets the details of the authorization specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.Get"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.Get"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific Authorization from the Authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.Delete"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific Authorization from the Authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.Delete"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AuthorizationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.Update"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationContractResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, AuthorizationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.Update"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationContractResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Confirm valid consent code to suppress Authorizations anti-phishing page. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/confirmConsentCode + /// + /// + /// Operation Id + /// Authorization_ConfirmConsentCode + /// + /// + /// + /// Create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task ConfirmConsentCodeAsync(AuthorizationConfirmConsentCodeRequestContract authorizationConfirmConsentCodeRequestContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(authorizationConfirmConsentCodeRequestContract, nameof(authorizationConfirmConsentCodeRequestContract)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.ConfirmConsentCode"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.ConfirmConsentCodeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationConfirmConsentCodeRequestContract, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Confirm valid consent code to suppress Authorizations anti-phishing page. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/confirmConsentCode + /// + /// + /// Operation Id + /// Authorization_ConfirmConsentCode + /// + /// + /// + /// Create parameters. + /// The cancellation token to use. + /// is null. + public virtual Response ConfirmConsentCode(AuthorizationConfirmConsentCodeRequestContract authorizationConfirmConsentCodeRequestContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(authorizationConfirmConsentCodeRequestContract, nameof(authorizationConfirmConsentCodeRequestContract)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.ConfirmConsentCode"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.ConfirmConsentCode(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationConfirmConsentCodeRequestContract, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets authorization login links. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/getLoginLinks + /// + /// + /// Operation Id + /// AuthorizationLoginLinks_Post + /// + /// + /// + /// Create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> PostAuthorizationLoginLinkAsync(AuthorizationLoginRequestContract authorizationLoginRequestContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(authorizationLoginRequestContract, nameof(authorizationLoginRequestContract)); + + using var scope = _authorizationLoginLinksClientDiagnostics.CreateScope("AuthorizationContractResource.PostAuthorizationLoginLink"); + scope.Start(); + try + { + var response = await _authorizationLoginLinksRestClient.PostAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationLoginRequestContract, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets authorization login links. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/getLoginLinks + /// + /// + /// Operation Id + /// AuthorizationLoginLinks_Post + /// + /// + /// + /// Create parameters. + /// The cancellation token to use. + /// is null. + public virtual Response PostAuthorizationLoginLink(AuthorizationLoginRequestContract authorizationLoginRequestContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(authorizationLoginRequestContract, nameof(authorizationLoginRequestContract)); + + using var scope = _authorizationLoginLinksClientDiagnostics.CreateScope("AuthorizationContractResource.PostAuthorizationLoginLink"); + scope.Start(); + try + { + var response = _authorizationLoginLinksRestClient.Post(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationLoginRequestContract, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractCollection.cs new file mode 100644 index 0000000000000..75e2763737545 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractCollection.cs @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAuthorizationProviderContracts method from an instance of . + /// + public partial class AuthorizationProviderContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _authorizationProviderContractAuthorizationProviderClientDiagnostics; + private readonly AuthorizationProviderRestOperations _authorizationProviderContractAuthorizationProviderRestClient; + + /// Initializes a new instance of the class for mocking. + protected AuthorizationProviderContractCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal AuthorizationProviderContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _authorizationProviderContractAuthorizationProviderClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", AuthorizationProviderContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AuthorizationProviderContractResource.ResourceType, out string authorizationProviderContractAuthorizationProviderApiVersion); + _authorizationProviderContractAuthorizationProviderRestClient = new AuthorizationProviderRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, authorizationProviderContractAuthorizationProviderApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApiManagementServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApiManagementServiceResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Identifier of the authorization provider. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string authorizationProviderId, AuthorizationProviderContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationProviderContractResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Identifier of the authorization provider. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string authorizationProviderId, AuthorizationProviderContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, data, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationProviderContractResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization provider specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.Get"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationProviderContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization provider specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.Get"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationProviderContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists a collection of authorization providers defined within a service instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders + /// + /// + /// Operation Id + /// AuthorizationProvider_ListByService + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _authorizationProviderContractAuthorizationProviderRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _authorizationProviderContractAuthorizationProviderRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AuthorizationProviderContractResource(Client, AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(e)), _authorizationProviderContractAuthorizationProviderClientDiagnostics, Pipeline, "AuthorizationProviderContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists a collection of authorization providers defined within a service instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders + /// + /// + /// Operation Id + /// AuthorizationProvider_ListByService + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _authorizationProviderContractAuthorizationProviderRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _authorizationProviderContractAuthorizationProviderRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AuthorizationProviderContractResource(Client, AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(e)), _authorizationProviderContractAuthorizationProviderClientDiagnostics, Pipeline, "AuthorizationProviderContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.Exists"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.Exists"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractData.cs new file mode 100644 index 0000000000000..8e72826c6263a --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractData.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the AuthorizationProviderContract data model. + /// Authorization Provider contract. + /// + public partial class AuthorizationProviderContractData : ResourceData + { + /// Initializes a new instance of AuthorizationProviderContractData. + public AuthorizationProviderContractData() + { + } + + /// Initializes a new instance of AuthorizationProviderContractData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Authorization Provider name. Must be 1 to 300 characters long. + /// Identity provider name. Must be 1 to 300 characters long. + /// OAuth2 settings. + internal AuthorizationProviderContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, string identityProvider, AuthorizationProviderOAuth2Settings oauth2) : base(id, name, resourceType, systemData) + { + DisplayName = displayName; + IdentityProvider = identityProvider; + Oauth2 = oauth2; + } + + /// Authorization Provider name. Must be 1 to 300 characters long. + public string DisplayName { get; set; } + /// Identity provider name. Must be 1 to 300 characters long. + public string IdentityProvider { get; set; } + /// OAuth2 settings. + public AuthorizationProviderOAuth2Settings Oauth2 { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.cs new file mode 100644 index 0000000000000..800d08af29af8 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.cs @@ -0,0 +1,354 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing an AuthorizationProviderContract along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAuthorizationProviderContractResource method. + /// Otherwise you can get one from its parent resource using the GetAuthorizationProviderContract method. + /// + public partial class AuthorizationProviderContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _authorizationProviderContractAuthorizationProviderClientDiagnostics; + private readonly AuthorizationProviderRestOperations _authorizationProviderContractAuthorizationProviderRestClient; + private readonly AuthorizationProviderContractData _data; + + /// Initializes a new instance of the class for mocking. + protected AuthorizationProviderContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AuthorizationProviderContractResource(ArmClient client, AuthorizationProviderContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal AuthorizationProviderContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _authorizationProviderContractAuthorizationProviderClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string authorizationProviderContractAuthorizationProviderApiVersion); + _authorizationProviderContractAuthorizationProviderRestClient = new AuthorizationProviderRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, authorizationProviderContractAuthorizationProviderApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/authorizationProviders"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual AuthorizationProviderContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of AuthorizationContractResources in the AuthorizationProviderContract. + /// An object representing collection of AuthorizationContractResources and their operations over a AuthorizationContractResource. + public virtual AuthorizationContractCollection GetAuthorizationContracts() + { + return GetCachedClient(Client => new AuthorizationContractCollection(Client, Id)); + } + + /// + /// Gets the details of the authorization specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetAuthorizationContractAsync(string authorizationId, CancellationToken cancellationToken = default) + { + return await GetAuthorizationContracts().GetAsync(authorizationId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the authorization specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetAuthorizationContract(string authorizationId, CancellationToken cancellationToken = default) + { + return GetAuthorizationContracts().Get(authorizationId, cancellationToken); + } + + /// + /// Gets the details of the authorization provider specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractResource.Get"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationProviderContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization provider specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractResource.Get"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationProviderContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific authorization provider from the API Management service instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractResource.Delete"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific authorization provider from the API Management service instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractResource.Delete"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AuthorizationProviderContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractResource.Update"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationProviderContractResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, AuthorizationProviderContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractResource.Update"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationProviderContractResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractCollection.cs new file mode 100644 index 0000000000000..097718e8e2acf --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractCollection.cs @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDocumentationContracts method from an instance of . + /// + public partial class DocumentationContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _documentationContractDocumentationClientDiagnostics; + private readonly DocumentationRestOperations _documentationContractDocumentationRestClient; + + /// Initializes a new instance of the class for mocking. + protected DocumentationContractCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DocumentationContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _documentationContractDocumentationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", DocumentationContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DocumentationContractResource.ResourceType, out string documentationContractDocumentationApiVersion); + _documentationContractDocumentationRestClient = new DocumentationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, documentationContractDocumentationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApiManagementServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApiManagementServiceResource.ResourceType), nameof(id)); + } + + /// + /// Creates a new Documentation or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string documentationId, DocumentationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(Response.FromValue(new DocumentationContractResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a new Documentation or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string documentationId, DocumentationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, data, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(Response.FromValue(new DocumentationContractResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Documentation specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.Get"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Documentation specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.Get"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists all Documentations of the API Management service instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations + /// + /// + /// Operation Id + /// Documentation_ListByService + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq | contains |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _documentationContractDocumentationRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _documentationContractDocumentationRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DocumentationContractResource(Client, DocumentationContractData.DeserializeDocumentationContractData(e)), _documentationContractDocumentationClientDiagnostics, Pipeline, "DocumentationContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists all Documentations of the API Management service instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations + /// + /// + /// Operation Id + /// Documentation_ListByService + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq | contains |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _documentationContractDocumentationRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _documentationContractDocumentationRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DocumentationContractResource(Client, DocumentationContractData.DeserializeDocumentationContractData(e)), _documentationContractDocumentationClientDiagnostics, Pipeline, "DocumentationContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.Exists"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.Exists"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractData.cs new file mode 100644 index 0000000000000..7d32750e81f66 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractData.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the DocumentationContract data model. + /// Markdown documentation details. + /// + public partial class DocumentationContractData : ResourceData + { + /// Initializes a new instance of DocumentationContractData. + public DocumentationContractData() + { + } + + /// Initializes a new instance of DocumentationContractData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// documentation title. + /// Markdown documentation content. + internal DocumentationContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string title, string content) : base(id, name, resourceType, systemData) + { + Title = title; + Content = content; + } + + /// documentation title. + public string Title { get; set; } + /// Markdown documentation content. + public string Content { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.cs new file mode 100644 index 0000000000000..6a1732a45b403 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.cs @@ -0,0 +1,354 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a DocumentationContract along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDocumentationContractResource method. + /// Otherwise you can get one from its parent resource using the GetDocumentationContract method. + /// + public partial class DocumentationContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string documentationId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _documentationContractDocumentationClientDiagnostics; + private readonly DocumentationRestOperations _documentationContractDocumentationRestClient; + private readonly DocumentationContractData _data; + + /// Initializes a new instance of the class for mocking. + protected DocumentationContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DocumentationContractResource(ArmClient client, DocumentationContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DocumentationContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _documentationContractDocumentationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string documentationContractDocumentationApiVersion); + _documentationContractDocumentationRestClient = new DocumentationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, documentationContractDocumentationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/documentations"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DocumentationContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the Documentation specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.Get"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Documentation specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.Get"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Documentation from an API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.Delete"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Documentation from an API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.Delete"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Documentation for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Update + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Documentation Update parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, DocumentationContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.Update"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Documentation for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Update + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Documentation Update parameters. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, DocumentationContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.Update"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, patch, cancellationToken); + return Response.FromValue(new DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Documentation by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_GetEntityTag + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Documentation by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_GetEntityTag + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/ApiManagementExtensions.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/ApiManagementExtensions.cs index cbbef042984fd..7b67ce0cac870 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/ApiManagementExtensions.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/ApiManagementExtensions.cs @@ -441,6 +441,25 @@ public static ApiOperationPolicyResource GetApiOperationPolicyResource(this ArmC } #endregion + #region ServiceApiResolverPolicyResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static ServiceApiResolverPolicyResource GetServiceApiResolverPolicyResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + ServiceApiResolverPolicyResource.ValidateResourceId(id); + return new ServiceApiResolverPolicyResource(client, id); + } + ); + } + #endregion + #region ApiPolicyResource /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. @@ -574,6 +593,25 @@ public static ApiManagementTagResource GetApiManagementTagResource(this ArmClien } #endregion + #region ResolverContractResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static ResolverContractResource GetResolverContractResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + ResolverContractResource.ValidateResourceId(id); + return new ResolverContractResource(client, id); + } + ); + } + #endregion + #region ApiSchemaResource /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. @@ -726,6 +764,44 @@ public static ApiTagDescriptionResource GetApiTagDescriptionResource(this ArmCli } #endregion + #region ServiceApiWikiResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static ServiceApiWikiResource GetServiceApiWikiResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + ServiceApiWikiResource.ValidateResourceId(id); + return new ServiceApiWikiResource(client, id); + } + ); + } + #endregion + + #region ServiceProductWikiResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static ServiceProductWikiResource GetServiceProductWikiResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + ServiceProductWikiResource.ValidateResourceId(id); + return new ServiceProductWikiResource(client, id); + } + ); + } + #endregion + #region ApiVersionSetResource /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. @@ -764,6 +840,63 @@ public static ApiManagementAuthorizationServerResource GetApiManagementAuthoriza } #endregion + #region AuthorizationProviderContractResource + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static AuthorizationProviderContractResource GetAuthorizationProviderContractResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + AuthorizationProviderContractResource.ValidateResourceId(id); + return new AuthorizationProviderContractResource(client, id); + } + ); + } + #endregion + + #region AuthorizationContractResource + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static AuthorizationContractResource GetAuthorizationContractResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + AuthorizationContractResource.ValidateResourceId(id); + return new AuthorizationContractResource(client, id); + } + ); + } + #endregion + + #region AuthorizationAccessPolicyContractResource + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static AuthorizationAccessPolicyContractResource GetAuthorizationAccessPolicyContractResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + AuthorizationAccessPolicyContractResource.ValidateResourceId(id); + return new AuthorizationAccessPolicyContractResource(client, id); + } + ); + } + #endregion + #region ApiManagementBackendResource /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. @@ -1049,6 +1182,44 @@ public static ApiManagementOpenIdConnectProviderResource GetApiManagementOpenIdC } #endregion + #region PolicyFragmentContractResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static PolicyFragmentContractResource GetPolicyFragmentContractResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + PolicyFragmentContractResource.ValidateResourceId(id); + return new PolicyFragmentContractResource(client, id); + } + ); + } + #endregion + + #region PortalConfigContractResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static PortalConfigContractResource GetPortalConfigContractResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + PortalConfigContractResource.ValidateResourceId(id); + return new PortalConfigContractResource(client, id); + } + ); + } + #endregion + #region ApiManagementPortalRevisionResource /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. @@ -1295,5 +1466,24 @@ public static ApiManagementUserResource GetApiManagementUserResource(this ArmCli ); } #endregion + + #region DocumentationContractResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static DocumentationContractResource GetDocumentationContractResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + DocumentationContractResource.ValidateResourceId(id); + return new DocumentationContractResource(client, id); + } + ); + } + #endregion } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/LongRunningOperation/PolicyFragmentContractOperationSource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/LongRunningOperation/PolicyFragmentContractOperationSource.cs new file mode 100644 index 0000000000000..1e65d25f7c618 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/LongRunningOperation/PolicyFragmentContractOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ApiManagement +{ + internal class PolicyFragmentContractOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal PolicyFragmentContractOperationSource(ArmClient client) + { + _client = client; + } + + PolicyFragmentContractResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = PolicyFragmentContractData.DeserializePolicyFragmentContractData(document.RootElement); + return new PolicyFragmentContractResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = PolicyFragmentContractData.DeserializePolicyFragmentContractData(document.RootElement); + return new PolicyFragmentContractResource(_client, data); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.Serialization.cs index 942f3c53ff049..9a36605f4b922 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.Serialization.cs @@ -42,6 +42,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("virtualNetworkConfiguration"u8); writer.WriteObjectValue(VirtualNetworkConfiguration); } + if (Optional.IsDefined(NatGatewayState)) + { + writer.WritePropertyName("natGatewayState"u8); + writer.WriteStringValue(NatGatewayState.Value.ToString()); + } if (Optional.IsDefined(DisableGateway)) { writer.WritePropertyName("disableGateway"u8); @@ -64,6 +69,8 @@ internal static AdditionalLocation DeserializeAdditionalLocation(JsonElement ele Optional publicIPAddressId = default; Optional virtualNetworkConfiguration = default; Optional gatewayRegionalUri = default; + Optional natGatewayState = default; + Optional> outboundPublicIPAddresses = default; Optional disableGateway = default; Optional platformVersion = default; foreach (var property in element.EnumerateObject()) @@ -167,6 +174,31 @@ internal static AdditionalLocation DeserializeAdditionalLocation(JsonElement ele gatewayRegionalUri = new Uri(property.Value.GetString()); continue; } + if (property.NameEquals("natGatewayState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + natGatewayState = new NatGatewayState(property.Value.GetString()); + continue; + } + if (property.NameEquals("outboundPublicIPAddresses"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + outboundPublicIPAddresses = array; + continue; + } if (property.NameEquals("disableGateway"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -188,7 +220,7 @@ internal static AdditionalLocation DeserializeAdditionalLocation(JsonElement ele continue; } } - return new AdditionalLocation(location, sku, Optional.ToList(zones), Optional.ToList(publicIPAddresses), Optional.ToList(privateIPAddresses), publicIPAddressId.Value, virtualNetworkConfiguration.Value, gatewayRegionalUri.Value, Optional.ToNullable(disableGateway), Optional.ToNullable(platformVersion)); + return new AdditionalLocation(location, sku, Optional.ToList(zones), Optional.ToList(publicIPAddresses), Optional.ToList(privateIPAddresses), publicIPAddressId.Value, virtualNetworkConfiguration.Value, gatewayRegionalUri.Value, Optional.ToNullable(natGatewayState), Optional.ToList(outboundPublicIPAddresses), Optional.ToNullable(disableGateway), Optional.ToNullable(platformVersion)); } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.cs index 377f7a3cf48f8..48301425dc75f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.cs @@ -28,6 +28,7 @@ public AdditionalLocation(AzureLocation location, ApiManagementServiceSkuPropert Zones = new ChangeTrackingList(); PublicIPAddresses = new ChangeTrackingList(); PrivateIPAddresses = new ChangeTrackingList(); + OutboundPublicIPAddresses = new ChangeTrackingList(); } /// Initializes a new instance of AdditionalLocation. @@ -39,9 +40,11 @@ public AdditionalLocation(AzureLocation location, ApiManagementServiceSkuPropert /// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported only for Premium SKU being deployed in Virtual Network. /// Virtual network configuration for the location. /// Gateway URL of the API Management service in the Region. + /// Property can be used to enable NAT Gateway for this API Management service. + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location. /// Compute Platform Version running the service. - internal AdditionalLocation(AzureLocation location, ApiManagementServiceSkuProperties sku, IList zones, IReadOnlyList publicIPAddresses, IReadOnlyList privateIPAddresses, ResourceIdentifier publicIPAddressId, VirtualNetworkConfiguration virtualNetworkConfiguration, Uri gatewayRegionalUri, bool? disableGateway, PlatformVersion? platformVersion) + internal AdditionalLocation(AzureLocation location, ApiManagementServiceSkuProperties sku, IList zones, IReadOnlyList publicIPAddresses, IReadOnlyList privateIPAddresses, ResourceIdentifier publicIPAddressId, VirtualNetworkConfiguration virtualNetworkConfiguration, Uri gatewayRegionalUri, NatGatewayState? natGatewayState, IReadOnlyList outboundPublicIPAddresses, bool? disableGateway, PlatformVersion? platformVersion) { Location = location; Sku = sku; @@ -51,6 +54,8 @@ internal AdditionalLocation(AzureLocation location, ApiManagementServiceSkuPrope PublicIPAddressId = publicIPAddressId; VirtualNetworkConfiguration = virtualNetworkConfiguration; GatewayRegionalUri = gatewayRegionalUri; + NatGatewayState = natGatewayState; + OutboundPublicIPAddresses = outboundPublicIPAddresses; DisableGateway = disableGateway; PlatformVersion = platformVersion; } @@ -71,6 +76,10 @@ internal AdditionalLocation(AzureLocation location, ApiManagementServiceSkuPrope public VirtualNetworkConfiguration VirtualNetworkConfiguration { get; set; } /// Gateway URL of the API Management service in the Region. public Uri GatewayRegionalUri { get; } + /// Property can be used to enable NAT Gateway for this API Management service. + public NatGatewayState? NatGatewayState { get; set; } + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. + public IReadOnlyList OutboundPublicIPAddresses { get; } /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location. public bool? DisableGateway { get; set; } /// Compute Platform Version running the service. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.Serialization.cs index 9bf70c043dd94..db1e51361ddb8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.Serialization.cs @@ -142,6 +142,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("apiType"u8); writer.WriteStringValue(SoapApiType.Value.ToString()); } + if (Optional.IsDefined(TranslateRequiredQueryParametersConduct)) + { + writer.WritePropertyName("translateRequiredQueryParameters"u8); + writer.WriteStringValue(TranslateRequiredQueryParametersConduct.Value.ToString()); + } writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.cs index 20deabffcd144..307ac2d5be715 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.cs @@ -76,5 +76,7 @@ public ApiCreateOrUpdateContent() /// * `graphql` creates GraphQL API. /// public SoapApiType? SoapApiType { get; set; } + /// Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'. + public TranslateRequiredQueryParametersConduct? TranslateRequiredQueryParametersConduct { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerData.Serialization.cs index e22914f8b00ca..1ce9c84108c9b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerData.Serialization.cs @@ -95,6 +95,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("displayName"u8); writer.WriteStringValue(DisplayName); } + if (Optional.IsDefined(UseInTestConsole)) + { + writer.WritePropertyName("useInTestConsole"u8); + writer.WriteBooleanValue(UseInTestConsole.Value); + } + if (Optional.IsDefined(UseInApiDocumentation)) + { + writer.WritePropertyName("useInApiDocumentation"u8); + writer.WriteBooleanValue(UseInApiDocumentation.Value); + } if (Optional.IsDefined(ClientRegistrationEndpoint)) { writer.WritePropertyName("clientRegistrationEndpoint"u8); @@ -150,6 +160,8 @@ internal static ApiManagementAuthorizationServerData DeserializeApiManagementAut Optional resourceOwnerUsername = default; Optional resourceOwnerPassword = default; Optional displayName = default; + Optional useInTestConsole = default; + Optional useInApiDocumentation = default; Optional clientRegistrationEndpoint = default; Optional authorizationEndpoint = default; Optional> grantTypes = default; @@ -291,6 +303,26 @@ internal static ApiManagementAuthorizationServerData DeserializeApiManagementAut displayName = property0.Value.GetString(); continue; } + if (property0.NameEquals("useInTestConsole"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + useInTestConsole = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("useInApiDocumentation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + useInApiDocumentation = property0.Value.GetBoolean(); + continue; + } if (property0.NameEquals("clientRegistrationEndpoint"u8)) { clientRegistrationEndpoint = property0.Value.GetString(); @@ -330,7 +362,7 @@ internal static ApiManagementAuthorizationServerData DeserializeApiManagementAut continue; } } - return new ApiManagementAuthorizationServerData(id, name, type, systemData.Value, description.Value, Optional.ToList(authorizationMethods), Optional.ToList(clientAuthenticationMethod), Optional.ToList(tokenBodyParameters), tokenEndpoint.Value, Optional.ToNullable(supportState), defaultScope.Value, Optional.ToList(bearerTokenSendingMethods), resourceOwnerUsername.Value, resourceOwnerPassword.Value, displayName.Value, clientRegistrationEndpoint.Value, authorizationEndpoint.Value, Optional.ToList(grantTypes), clientId.Value, clientSecret.Value); + return new ApiManagementAuthorizationServerData(id, name, type, systemData.Value, description.Value, Optional.ToList(authorizationMethods), Optional.ToList(clientAuthenticationMethod), Optional.ToList(tokenBodyParameters), tokenEndpoint.Value, Optional.ToNullable(supportState), defaultScope.Value, Optional.ToList(bearerTokenSendingMethods), resourceOwnerUsername.Value, resourceOwnerPassword.Value, displayName.Value, Optional.ToNullable(useInTestConsole), Optional.ToNullable(useInApiDocumentation), clientRegistrationEndpoint.Value, authorizationEndpoint.Value, Optional.ToList(grantTypes), clientId.Value, clientSecret.Value); } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.Serialization.cs index ebdbd3337c082..0a82aa9045565 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.Serialization.cs @@ -94,6 +94,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("displayName"u8); writer.WriteStringValue(DisplayName); } + if (Optional.IsDefined(UseInTestConsole)) + { + writer.WritePropertyName("useInTestConsole"u8); + writer.WriteBooleanValue(UseInTestConsole.Value); + } + if (Optional.IsDefined(UseInApiDocumentation)) + { + writer.WritePropertyName("useInApiDocumentation"u8); + writer.WriteBooleanValue(UseInApiDocumentation.Value); + } if (Optional.IsDefined(ClientRegistrationEndpoint)) { writer.WritePropertyName("clientRegistrationEndpoint"u8); @@ -149,6 +159,8 @@ internal static ApiManagementAuthorizationServerPatch DeserializeApiManagementAu Optional resourceOwnerUsername = default; Optional resourceOwnerPassword = default; Optional displayName = default; + Optional useInTestConsole = default; + Optional useInApiDocumentation = default; Optional clientRegistrationEndpoint = default; Optional authorizationEndpoint = default; Optional> grantTypes = default; @@ -290,6 +302,26 @@ internal static ApiManagementAuthorizationServerPatch DeserializeApiManagementAu displayName = property0.Value.GetString(); continue; } + if (property0.NameEquals("useInTestConsole"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + useInTestConsole = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("useInApiDocumentation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + useInApiDocumentation = property0.Value.GetBoolean(); + continue; + } if (property0.NameEquals("clientRegistrationEndpoint"u8)) { clientRegistrationEndpoint = property0.Value.GetString(); @@ -329,7 +361,7 @@ internal static ApiManagementAuthorizationServerPatch DeserializeApiManagementAu continue; } } - return new ApiManagementAuthorizationServerPatch(id, name, type, systemData.Value, description.Value, Optional.ToList(authorizationMethods), Optional.ToList(clientAuthenticationMethod), Optional.ToList(tokenBodyParameters), tokenEndpoint.Value, Optional.ToNullable(supportState), defaultScope.Value, Optional.ToList(bearerTokenSendingMethods), resourceOwnerUsername.Value, resourceOwnerPassword.Value, displayName.Value, clientRegistrationEndpoint.Value, authorizationEndpoint.Value, Optional.ToList(grantTypes), clientId.Value, clientSecret.Value); + return new ApiManagementAuthorizationServerPatch(id, name, type, systemData.Value, description.Value, Optional.ToList(authorizationMethods), Optional.ToList(clientAuthenticationMethod), Optional.ToList(tokenBodyParameters), tokenEndpoint.Value, Optional.ToNullable(supportState), defaultScope.Value, Optional.ToList(bearerTokenSendingMethods), resourceOwnerUsername.Value, resourceOwnerPassword.Value, displayName.Value, Optional.ToNullable(useInTestConsole), Optional.ToNullable(useInApiDocumentation), clientRegistrationEndpoint.Value, authorizationEndpoint.Value, Optional.ToList(grantTypes), clientId.Value, clientSecret.Value); } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.cs index 5c54650d4e25a..ab6c7cebec67e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.cs @@ -40,12 +40,14 @@ public ApiManagementAuthorizationServerPatch() /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. /// User-friendly authorization server name. + /// If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. + /// If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. /// Form of an authorization grant, which the client uses to request the access token. /// Client or app id registered with this authorization server. /// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. - internal ApiManagementAuthorizationServerPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, IList authorizationMethods, IList clientAuthenticationMethods, IList tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, IList bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, string clientRegistrationEndpoint, string authorizationEndpoint, IList grantTypes, string clientId, string clientSecret) : base(id, name, resourceType, systemData) + internal ApiManagementAuthorizationServerPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, IList authorizationMethods, IList clientAuthenticationMethods, IList tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, IList bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, bool? useInTestConsole, bool? useInApiDocumentation, string clientRegistrationEndpoint, string authorizationEndpoint, IList grantTypes, string clientId, string clientSecret) : base(id, name, resourceType, systemData) { Description = description; AuthorizationMethods = authorizationMethods; @@ -58,6 +60,8 @@ internal ApiManagementAuthorizationServerPatch(ResourceIdentifier id, string nam ResourceOwnerUsername = resourceOwnerUsername; ResourceOwnerPassword = resourceOwnerPassword; DisplayName = displayName; + UseInTestConsole = useInTestConsole; + UseInApiDocumentation = useInApiDocumentation; ClientRegistrationEndpoint = clientRegistrationEndpoint; AuthorizationEndpoint = authorizationEndpoint; GrantTypes = grantTypes; @@ -87,6 +91,10 @@ internal ApiManagementAuthorizationServerPatch(ResourceIdentifier id, string nam public string ResourceOwnerPassword { get; set; } /// User-friendly authorization server name. public string DisplayName { get; set; } + /// If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. + public bool? UseInTestConsole { get; set; } + /// If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. + public bool? UseInApiDocumentation { get; set; } /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. public string ClientRegistrationEndpoint { get; set; } /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.cs index 2ba20ee50e135..43705e02d7b99 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.cs @@ -21,7 +21,7 @@ public ApiManagementBackendPatch() public string Title { get; set; } /// Backend Description. public string Description { get; set; } - /// Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. + /// Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. public Uri ResourceUri { get; set; } /// Backend Properties contract. internal BackendProperties Properties { get; set; } @@ -39,7 +39,7 @@ public BackendServiceFabricClusterProperties BackendServiceFabricCluster /// Backend Credentials Contract Properties. public BackendCredentialsContract Credentials { get; set; } - /// Backend Proxy Contract Properties. + /// Backend gateway Contract Properties. public BackendProxyContract Proxy { get; set; } /// Backend TLS Properties. public BackendTlsProperties Tls { get; set; } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.Serialization.cs index 88c36fa76dde8..0535c0299b656 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.Serialization.cs @@ -64,6 +64,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("passwordResetPolicyName"u8); writer.WriteStringValue(PasswordResetPolicyName); } + if (Optional.IsDefined(ClientLibrary)) + { + writer.WritePropertyName("clientLibrary"u8); + writer.WriteStringValue(ClientLibrary); + } if (Optional.IsDefined(ClientId)) { writer.WritePropertyName("clientId"u8); @@ -96,6 +101,7 @@ internal static ApiManagementIdentityProviderCreateOrUpdateContent DeserializeAp Optional signinPolicyName = default; Optional profileEditingPolicyName = default; Optional passwordResetPolicyName = default; + Optional clientLibrary = default; Optional clientId = default; Optional clientSecret = default; foreach (var property in element.EnumerateObject()) @@ -189,6 +195,11 @@ internal static ApiManagementIdentityProviderCreateOrUpdateContent DeserializeAp passwordResetPolicyName = property0.Value.GetString(); continue; } + if (property0.NameEquals("clientLibrary"u8)) + { + clientLibrary = property0.Value.GetString(); + continue; + } if (property0.NameEquals("clientId"u8)) { clientId = property0.Value.GetString(); @@ -203,7 +214,7 @@ internal static ApiManagementIdentityProviderCreateOrUpdateContent DeserializeAp continue; } } - return new ApiManagementIdentityProviderCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToNullable(type0), signinTenant.Value, Optional.ToList(allowedTenants), authority.Value, signupPolicyName.Value, signinPolicyName.Value, profileEditingPolicyName.Value, passwordResetPolicyName.Value, clientId.Value, clientSecret.Value); + return new ApiManagementIdentityProviderCreateOrUpdateContent(id, name, type, systemData.Value, Optional.ToNullable(type0), signinTenant.Value, Optional.ToList(allowedTenants), authority.Value, signupPolicyName.Value, signinPolicyName.Value, profileEditingPolicyName.Value, passwordResetPolicyName.Value, clientLibrary.Value, clientId.Value, clientSecret.Value); } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.cs index aec3057b71a16..a22cdf146b6bd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.cs @@ -33,9 +33,10 @@ public ApiManagementIdentityProviderCreateOrUpdateContent() /// Signin Policy Name. Only applies to AAD B2C Identity Provider. /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. - internal ApiManagementIdentityProviderCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IdentityProviderType? identityProviderType, string signInTenant, IList allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientId, string clientSecret) : base(id, name, resourceType, systemData) + internal ApiManagementIdentityProviderCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IdentityProviderType? identityProviderType, string signInTenant, IList allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientLibrary, string clientId, string clientSecret) : base(id, name, resourceType, systemData) { IdentityProviderType = identityProviderType; SignInTenant = signInTenant; @@ -45,6 +46,7 @@ internal ApiManagementIdentityProviderCreateOrUpdateContent(ResourceIdentifier i SignInPolicyName = signInPolicyName; ProfileEditingPolicyName = profileEditingPolicyName; PasswordResetPolicyName = passwordResetPolicyName; + ClientLibrary = clientLibrary; ClientId = clientId; ClientSecret = clientSecret; } @@ -65,6 +67,8 @@ internal ApiManagementIdentityProviderCreateOrUpdateContent(ResourceIdentifier i public string ProfileEditingPolicyName { get; set; } /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. public string PasswordResetPolicyName { get; set; } + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. + public string ClientLibrary { get; set; } /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. public string ClientId { get; set; } /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderData.Serialization.cs index bb6547cf37ef8..9cc2cbf32823c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderData.Serialization.cs @@ -65,6 +65,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("passwordResetPolicyName"u8); writer.WriteStringValue(PasswordResetPolicyName); } + if (Optional.IsDefined(ClientLibrary)) + { + writer.WritePropertyName("clientLibrary"u8); + writer.WriteStringValue(ClientLibrary); + } if (Optional.IsDefined(ClientId)) { writer.WritePropertyName("clientId"u8); @@ -97,6 +102,7 @@ internal static ApiManagementIdentityProviderData DeserializeApiManagementIdenti Optional signinPolicyName = default; Optional profileEditingPolicyName = default; Optional passwordResetPolicyName = default; + Optional clientLibrary = default; Optional clientId = default; Optional clientSecret = default; foreach (var property in element.EnumerateObject()) @@ -190,6 +196,11 @@ internal static ApiManagementIdentityProviderData DeserializeApiManagementIdenti passwordResetPolicyName = property0.Value.GetString(); continue; } + if (property0.NameEquals("clientLibrary"u8)) + { + clientLibrary = property0.Value.GetString(); + continue; + } if (property0.NameEquals("clientId"u8)) { clientId = property0.Value.GetString(); @@ -204,7 +215,7 @@ internal static ApiManagementIdentityProviderData DeserializeApiManagementIdenti continue; } } - return new ApiManagementIdentityProviderData(id, name, type, systemData.Value, Optional.ToNullable(type0), signinTenant.Value, Optional.ToList(allowedTenants), authority.Value, signupPolicyName.Value, signinPolicyName.Value, profileEditingPolicyName.Value, passwordResetPolicyName.Value, clientId.Value, clientSecret.Value); + return new ApiManagementIdentityProviderData(id, name, type, systemData.Value, Optional.ToNullable(type0), signinTenant.Value, Optional.ToList(allowedTenants), authority.Value, signupPolicyName.Value, signinPolicyName.Value, profileEditingPolicyName.Value, passwordResetPolicyName.Value, clientLibrary.Value, clientId.Value, clientSecret.Value); } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.Serialization.cs index 0fd832756a99c..eab20f3412cb8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.Serialization.cs @@ -62,6 +62,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("passwordResetPolicyName"u8); writer.WriteStringValue(PasswordResetPolicyName); } + if (Optional.IsDefined(ClientLibrary)) + { + writer.WritePropertyName("clientLibrary"u8); + writer.WriteStringValue(ClientLibrary); + } if (Optional.IsDefined(ClientId)) { writer.WritePropertyName("clientId"u8); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.cs index 74d338d8322ea..ece4dad6feca1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.cs @@ -35,6 +35,8 @@ public ApiManagementIdentityProviderPatch() public string ProfileEditingPolicyName { get; set; } /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. public string PasswordResetPolicyName { get; set; } + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. + public string ClientLibrary { get; set; } /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. public string ClientId { get; set; } /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderData.Serialization.cs index 77445406788cb..a48bdb5c1d563 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderData.Serialization.cs @@ -43,6 +43,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("clientSecret"u8); writer.WriteStringValue(ClientSecret); } + if (Optional.IsDefined(UseInTestConsole)) + { + writer.WritePropertyName("useInTestConsole"u8); + writer.WriteBooleanValue(UseInTestConsole.Value); + } + if (Optional.IsDefined(UseInApiDocumentation)) + { + writer.WritePropertyName("useInApiDocumentation"u8); + writer.WriteBooleanValue(UseInApiDocumentation.Value); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -62,6 +72,8 @@ internal static ApiManagementOpenIdConnectProviderData DeserializeApiManagementO Optional metadataEndpoint = default; Optional clientId = default; Optional clientSecret = default; + Optional useInTestConsole = default; + Optional useInApiDocumentation = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -123,11 +135,31 @@ internal static ApiManagementOpenIdConnectProviderData DeserializeApiManagementO clientSecret = property0.Value.GetString(); continue; } + if (property0.NameEquals("useInTestConsole"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + useInTestConsole = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("useInApiDocumentation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + useInApiDocumentation = property0.Value.GetBoolean(); + continue; + } } continue; } } - return new ApiManagementOpenIdConnectProviderData(id, name, type, systemData.Value, displayName.Value, description.Value, metadataEndpoint.Value, clientId.Value, clientSecret.Value); + return new ApiManagementOpenIdConnectProviderData(id, name, type, systemData.Value, displayName.Value, description.Value, metadataEndpoint.Value, clientId.Value, clientSecret.Value, Optional.ToNullable(useInTestConsole), Optional.ToNullable(useInApiDocumentation)); } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.Serialization.cs index e8f0b52e92735..c0a2fc201b65d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.Serialization.cs @@ -42,6 +42,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("clientSecret"u8); writer.WriteStringValue(ClientSecret); } + if (Optional.IsDefined(UseInTestConsole)) + { + writer.WritePropertyName("useInTestConsole"u8); + writer.WriteBooleanValue(UseInTestConsole.Value); + } + if (Optional.IsDefined(UseInApiDocumentation)) + { + writer.WritePropertyName("useInApiDocumentation"u8); + writer.WriteBooleanValue(UseInApiDocumentation.Value); + } writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.cs index 789866c595448..858c4eccc691a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.cs @@ -25,5 +25,9 @@ public ApiManagementOpenIdConnectProviderPatch() public string ClientId { get; set; } /// Client Secret of developer console which is the client application. public string ClientSecret { get; set; } + /// If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. + public bool? UseInTestConsole { get; set; } + /// If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. + public bool? UseInApiDocumentation { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceData.Serialization.cs index 318aca32b93db..61663cf1bf980 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceData.Serialization.cs @@ -119,6 +119,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("enableClientCertificate"u8); writer.WriteBooleanValue(EnableClientCertificate.Value); } + if (Optional.IsDefined(NatGatewayState)) + { + writer.WritePropertyName("natGatewayState"u8); + writer.WriteStringValue(NatGatewayState.Value.ToString()); + } if (Optional.IsDefined(DisableGateway)) { writer.WritePropertyName("disableGateway"u8); @@ -193,6 +198,8 @@ internal static ApiManagementServiceData DeserializeApiManagementServiceData(Jso Optional> customProperties = default; Optional> certificates = default; Optional enableClientCertificate = default; + Optional natGatewayState = default; + Optional> outboundPublicIPAddresses = default; Optional disableGateway = default; Optional virtualNetworkType = default; Optional apiVersionConstraint = default; @@ -526,6 +533,31 @@ internal static ApiManagementServiceData DeserializeApiManagementServiceData(Jso enableClientCertificate = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("natGatewayState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + natGatewayState = new NatGatewayState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("outboundPublicIPAddresses"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + outboundPublicIPAddresses = array; + continue; + } if (property0.NameEquals("disableGateway"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -605,7 +637,7 @@ internal static ApiManagementServiceData DeserializeApiManagementServiceData(Jso continue; } } - return new ApiManagementServiceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku, identity, Optional.ToNullable(etag), Optional.ToList(zones), notificationSenderEmail.Value, provisioningState.Value, targetProvisioningState.Value, Optional.ToNullable(createdAtUtc), gatewayUri.Value, gatewayRegionalUri.Value, portalUri.Value, managementApiUri.Value, scmUri.Value, developerPortalUri.Value, Optional.ToList(hostnameConfigurations), Optional.ToList(publicIPAddresses), Optional.ToList(privateIPAddresses), publicIPAddressId.Value, Optional.ToNullable(publicNetworkAccess), virtualNetworkConfiguration.Value, Optional.ToList(additionalLocations), Optional.ToDictionary(customProperties), Optional.ToList(certificates), Optional.ToNullable(enableClientCertificate), Optional.ToNullable(disableGateway), Optional.ToNullable(virtualNetworkType), apiVersionConstraint.Value, Optional.ToNullable(restore), Optional.ToList(privateEndpointConnections), Optional.ToNullable(platformVersion), publisherEmail, publisherName); + return new ApiManagementServiceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku, identity, Optional.ToNullable(etag), Optional.ToList(zones), notificationSenderEmail.Value, provisioningState.Value, targetProvisioningState.Value, Optional.ToNullable(createdAtUtc), gatewayUri.Value, gatewayRegionalUri.Value, portalUri.Value, managementApiUri.Value, scmUri.Value, developerPortalUri.Value, Optional.ToList(hostnameConfigurations), Optional.ToList(publicIPAddresses), Optional.ToList(privateIPAddresses), publicIPAddressId.Value, Optional.ToNullable(publicNetworkAccess), virtualNetworkConfiguration.Value, Optional.ToList(additionalLocations), Optional.ToDictionary(customProperties), Optional.ToList(certificates), Optional.ToNullable(enableClientCertificate), Optional.ToNullable(natGatewayState), Optional.ToList(outboundPublicIPAddresses), Optional.ToNullable(disableGateway), Optional.ToNullable(virtualNetworkType), apiVersionConstraint.Value, Optional.ToNullable(restore), Optional.ToList(privateEndpointConnections), Optional.ToNullable(platformVersion), publisherEmail, publisherName); } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.Serialization.cs index f33c1e31e69c9..a36c63bf8a050 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.Serialization.cs @@ -119,6 +119,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("enableClientCertificate"u8); writer.WriteBooleanValue(EnableClientCertificate.Value); } + if (Optional.IsDefined(NatGatewayState)) + { + writer.WritePropertyName("natGatewayState"u8); + writer.WriteStringValue(NatGatewayState.Value.ToString()); + } if (Optional.IsDefined(DisableGateway)) { writer.WritePropertyName("disableGateway"u8); @@ -198,6 +203,8 @@ internal static ApiManagementServicePatch DeserializeApiManagementServicePatch(J Optional> customProperties = default; Optional> certificates = default; Optional enableClientCertificate = default; + Optional natGatewayState = default; + Optional> outboundPublicIPAddresses = default; Optional disableGateway = default; Optional virtualNetworkType = default; Optional apiVersionConstraint = default; @@ -531,6 +538,31 @@ internal static ApiManagementServicePatch DeserializeApiManagementServicePatch(J enableClientCertificate = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("natGatewayState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + natGatewayState = new NatGatewayState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("outboundPublicIPAddresses"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + outboundPublicIPAddresses = array; + continue; + } if (property0.NameEquals("disableGateway"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -610,7 +642,7 @@ internal static ApiManagementServicePatch DeserializeApiManagementServicePatch(J continue; } } - return new ApiManagementServicePatch(id, name, type, systemData.Value, sku.Value, identity, Optional.ToNullable(etag), Optional.ToList(zones), notificationSenderEmail.Value, provisioningState.Value, targetProvisioningState.Value, Optional.ToNullable(createdAtUtc), gatewayUri.Value, gatewayRegionalUri.Value, portalUri.Value, managementApiUri.Value, scmUri.Value, developerPortalUri.Value, Optional.ToList(hostnameConfigurations), Optional.ToList(publicIPAddresses), Optional.ToList(privateIPAddresses), publicIPAddressId.Value, Optional.ToNullable(publicNetworkAccess), virtualNetworkConfiguration.Value, Optional.ToList(additionalLocations), Optional.ToDictionary(customProperties), Optional.ToList(certificates), Optional.ToNullable(enableClientCertificate), Optional.ToNullable(disableGateway), Optional.ToNullable(virtualNetworkType), apiVersionConstraint.Value, Optional.ToNullable(restore), Optional.ToList(privateEndpointConnections), Optional.ToNullable(platformVersion), publisherEmail.Value, publisherName.Value, Optional.ToDictionary(tags)); + return new ApiManagementServicePatch(id, name, type, systemData.Value, sku.Value, identity, Optional.ToNullable(etag), Optional.ToList(zones), notificationSenderEmail.Value, provisioningState.Value, targetProvisioningState.Value, Optional.ToNullable(createdAtUtc), gatewayUri.Value, gatewayRegionalUri.Value, portalUri.Value, managementApiUri.Value, scmUri.Value, developerPortalUri.Value, Optional.ToList(hostnameConfigurations), Optional.ToList(publicIPAddresses), Optional.ToList(privateIPAddresses), publicIPAddressId.Value, Optional.ToNullable(publicNetworkAccess), virtualNetworkConfiguration.Value, Optional.ToList(additionalLocations), Optional.ToDictionary(customProperties), Optional.ToList(certificates), Optional.ToNullable(enableClientCertificate), Optional.ToNullable(natGatewayState), Optional.ToList(outboundPublicIPAddresses), Optional.ToNullable(disableGateway), Optional.ToNullable(virtualNetworkType), apiVersionConstraint.Value, Optional.ToNullable(restore), Optional.ToList(privateEndpointConnections), Optional.ToNullable(platformVersion), publisherEmail.Value, publisherName.Value, Optional.ToDictionary(tags)); } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.cs index d20467e7befad..1ffb76594873c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.cs @@ -27,6 +27,7 @@ public ApiManagementServicePatch() AdditionalLocations = new ChangeTrackingList(); CustomProperties = new ChangeTrackingDictionary(); Certificates = new ChangeTrackingList(); + OutboundPublicIPAddresses = new ChangeTrackingList(); PrivateEndpointConnections = new ChangeTrackingList(); Tags = new ChangeTrackingDictionary(); } @@ -57,9 +58,11 @@ public ApiManagementServicePatch() /// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Virtual network configuration of the API Management service. /// Additional datacenter locations of the API Management service. - /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.</br> Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + /// Property can be used to enable NAT Gateway for this API Management service. + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. /// Control Plane Apis version constraint for the API Management service. @@ -69,7 +72,7 @@ public ApiManagementServicePatch() /// Publisher email. /// Publisher name. /// Resource tags. - internal ApiManagementServicePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ApiManagementServiceSkuProperties sku, ManagedServiceIdentity identity, ETag? etag, IList zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, DateTimeOffset? createdAtUtc, Uri gatewayUri, Uri gatewayRegionalUri, Uri portalUri, Uri managementApiUri, Uri scmUri, Uri developerPortalUri, IList hostnameConfigurations, IReadOnlyList publicIPAddresses, IReadOnlyList privateIPAddresses, ResourceIdentifier publicIPAddressId, PublicNetworkAccess? publicNetworkAccess, VirtualNetworkConfiguration virtualNetworkConfiguration, IList additionalLocations, IDictionary customProperties, IList certificates, bool? enableClientCertificate, bool? disableGateway, VirtualNetworkType? virtualNetworkType, ApiVersionConstraint apiVersionConstraint, bool? restore, IList privateEndpointConnections, PlatformVersion? platformVersion, string publisherEmail, string publisherName, IDictionary tags) : base(id, name, resourceType, systemData) + internal ApiManagementServicePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ApiManagementServiceSkuProperties sku, ManagedServiceIdentity identity, ETag? etag, IList zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, DateTimeOffset? createdAtUtc, Uri gatewayUri, Uri gatewayRegionalUri, Uri portalUri, Uri managementApiUri, Uri scmUri, Uri developerPortalUri, IList hostnameConfigurations, IReadOnlyList publicIPAddresses, IReadOnlyList privateIPAddresses, ResourceIdentifier publicIPAddressId, PublicNetworkAccess? publicNetworkAccess, VirtualNetworkConfiguration virtualNetworkConfiguration, IList additionalLocations, IDictionary customProperties, IList certificates, bool? enableClientCertificate, NatGatewayState? natGatewayState, IReadOnlyList outboundPublicIPAddresses, bool? disableGateway, VirtualNetworkType? virtualNetworkType, ApiVersionConstraint apiVersionConstraint, bool? restore, IList privateEndpointConnections, PlatformVersion? platformVersion, string publisherEmail, string publisherName, IDictionary tags) : base(id, name, resourceType, systemData) { Sku = sku; Identity = identity; @@ -95,6 +98,8 @@ internal ApiManagementServicePatch(ResourceIdentifier id, string name, ResourceT CustomProperties = customProperties; Certificates = certificates; EnableClientCertificate = enableClientCertificate; + NatGatewayState = natGatewayState; + OutboundPublicIPAddresses = outboundPublicIPAddresses; DisableGateway = disableGateway; VirtualNetworkType = virtualNetworkType; ApiVersionConstraint = apiVersionConstraint; @@ -148,12 +153,16 @@ internal ApiManagementServicePatch(ResourceIdentifier id, string name, ResourceT public VirtualNetworkConfiguration VirtualNetworkConfiguration { get; set; } /// Additional datacenter locations of the API Management service. public IList AdditionalLocations { get; } - /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.</br> Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. public IDictionary CustomProperties { get; } /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. public IList Certificates { get; } /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. public bool? EnableClientCertificate { get; set; } + /// Property can be used to enable NAT Gateway for this API Management service. + public NatGatewayState? NatGatewayState { get; set; } + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. + public IReadOnlyList OutboundPublicIPAddresses { get; } /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. public bool? DisableGateway { get; set; } /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiSchemaType.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiSchemaType.cs index e9684357728c9..63c5b3fec82e3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiSchemaType.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiSchemaType.cs @@ -25,7 +25,7 @@ public ApiSchemaType(string value) private const string XmlValue = "xml"; private const string JsonValue = "json"; - /// Xml schema type. + /// XML schema type. public static ApiSchemaType Xml { get; } = new ApiSchemaType(XmlValue); /// Json schema type. public static ApiSchemaType Json { get; } = new ApiSchemaType(JsonValue); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.Serialization.cs index 7e80522e5aba0..37f97cdea2a3f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -25,6 +26,26 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("openid"u8); writer.WriteObjectValue(OpenId); } + if (Optional.IsCollectionDefined(OAuth2AuthenticationSettings)) + { + writer.WritePropertyName("oAuth2AuthenticationSettings"u8); + writer.WriteStartArray(); + foreach (var item in OAuth2AuthenticationSettings) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(OpenidAuthenticationSettings)) + { + writer.WritePropertyName("openidAuthenticationSettings"u8); + writer.WriteStartArray(); + foreach (var item in OpenidAuthenticationSettings) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } writer.WriteEndObject(); } @@ -36,6 +57,8 @@ internal static AuthenticationSettingsContract DeserializeAuthenticationSettings } Optional oAuth2 = default; Optional openid = default; + Optional> oAuth2AuthenticationSettings = default; + Optional> openidAuthenticationSettings = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("oAuth2"u8)) @@ -58,8 +81,38 @@ internal static AuthenticationSettingsContract DeserializeAuthenticationSettings openid = OpenIdAuthenticationSettingsContract.DeserializeOpenIdAuthenticationSettingsContract(property.Value); continue; } + if (property.NameEquals("oAuth2AuthenticationSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OAuth2AuthenticationSettingsContract.DeserializeOAuth2AuthenticationSettingsContract(item)); + } + oAuth2AuthenticationSettings = array; + continue; + } + if (property.NameEquals("openidAuthenticationSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OpenIdAuthenticationSettingsContract.DeserializeOpenIdAuthenticationSettingsContract(item)); + } + openidAuthenticationSettings = array; + continue; + } } - return new AuthenticationSettingsContract(oAuth2.Value, openid.Value); + return new AuthenticationSettingsContract(oAuth2.Value, openid.Value, Optional.ToList(oAuth2AuthenticationSettings), Optional.ToList(openidAuthenticationSettings)); } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.cs index bb0ae8079f74f..c83b2af57f223 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.cs @@ -5,6 +5,9 @@ #nullable disable +using System.Collections.Generic; +using Azure.Core; + namespace Azure.ResourceManager.ApiManagement.Models { /// API Authentication Settings. @@ -13,20 +16,30 @@ public partial class AuthenticationSettingsContract /// Initializes a new instance of AuthenticationSettingsContract. public AuthenticationSettingsContract() { + OAuth2AuthenticationSettings = new ChangeTrackingList(); + OpenidAuthenticationSettings = new ChangeTrackingList(); } /// Initializes a new instance of AuthenticationSettingsContract. /// OAuth2 Authentication settings. /// OpenID Connect Authentication Settings. - internal AuthenticationSettingsContract(OAuth2AuthenticationSettingsContract oAuth2, OpenIdAuthenticationSettingsContract openId) + /// Collection of OAuth2 authentication settings included into this API. + /// Collection of Open ID Connect authentication settings included into this API. + internal AuthenticationSettingsContract(OAuth2AuthenticationSettingsContract oAuth2, OpenIdAuthenticationSettingsContract openId, IList oAuth2AuthenticationSettings, IList openidAuthenticationSettings) { OAuth2 = oAuth2; OpenId = openId; + OAuth2AuthenticationSettings = oAuth2AuthenticationSettings; + OpenidAuthenticationSettings = openidAuthenticationSettings; } /// OAuth2 Authentication settings. public OAuth2AuthenticationSettingsContract OAuth2 { get; set; } /// OpenID Connect Authentication Settings. public OpenIdAuthenticationSettingsContract OpenId { get; set; } + /// Collection of OAuth2 authentication settings included into this API. + public IList OAuth2AuthenticationSettings { get; } + /// Collection of Open ID Connect authentication settings included into this API. + public IList OpenidAuthenticationSettings { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyContractData.Serialization.cs new file mode 100644 index 0000000000000..d652277572ac8 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyContractData.Serialization.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class AuthorizationAccessPolicyContractData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(TenantId)) + { + writer.WritePropertyName("tenantId"u8); + writer.WriteStringValue(TenantId.Value); + } + if (Optional.IsDefined(ObjectId)) + { + writer.WritePropertyName("objectId"u8); + writer.WriteStringValue(ObjectId); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static AuthorizationAccessPolicyContractData DeserializeAuthorizationAccessPolicyContractData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional tenantId = default; + Optional objectId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tenantId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + tenantId = property0.Value.GetGuid(); + continue; + } + if (property0.NameEquals("objectId"u8)) + { + objectId = property0.Value.GetString(); + continue; + } + } + continue; + } + } + return new AuthorizationAccessPolicyContractData(id, name, type, systemData.Value, Optional.ToNullable(tenantId), objectId.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.Serialization.cs new file mode 100644 index 0000000000000..9ada5a6e81125 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.Serialization.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ApiManagement; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class AuthorizationAccessPolicyListResult + { + internal static AuthorizationAccessPolicyListResult DeserializeAuthorizationAccessPolicyListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional count = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(item)); + } + value = array; + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + count = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new AuthorizationAccessPolicyListResult(Optional.ToList(value), Optional.ToNullable(count), nextLink.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.cs new file mode 100644 index 0000000000000..e2e83f54bf769 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ApiManagement; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Paged Authorization Access Policy list representation. + internal partial class AuthorizationAccessPolicyListResult + { + /// Initializes a new instance of AuthorizationAccessPolicyListResult. + internal AuthorizationAccessPolicyListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of AuthorizationAccessPolicyListResult. + /// Page values. + /// Total record count number across all pages. + /// Next page link if any. + internal AuthorizationAccessPolicyListResult(IReadOnlyList value, long? count, string nextLink) + { + Value = value; + Count = count; + NextLink = nextLink; + } + + /// Page values. + public IReadOnlyList Value { get; } + /// Total record count number across all pages. + public long? Count { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeRequestContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeRequestContract.Serialization.cs new file mode 100644 index 0000000000000..e1382e160b098 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeRequestContract.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class AuthorizationConfirmConsentCodeRequestContract : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ConsentCode)) + { + writer.WritePropertyName("consentCode"u8); + writer.WriteStringValue(ConsentCode); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeRequestContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeRequestContract.cs new file mode 100644 index 0000000000000..cd8977f316ef2 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeRequestContract.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Authorization confirm consent code request contract. + public partial class AuthorizationConfirmConsentCodeRequestContract + { + /// Initializes a new instance of AuthorizationConfirmConsentCodeRequestContract. + public AuthorizationConfirmConsentCodeRequestContract() + { + } + + /// The consent code from the authorization server after authorizing and consenting. + public string ConsentCode { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationContractData.Serialization.cs new file mode 100644 index 0000000000000..7c84690dd9909 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationContractData.Serialization.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class AuthorizationContractData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(AuthorizationType)) + { + writer.WritePropertyName("authorizationType"u8); + writer.WriteStringValue(AuthorizationType.Value.ToString()); + } + if (Optional.IsDefined(OAuth2GrantType)) + { + writer.WritePropertyName("oauth2grantType"u8); + writer.WriteStringValue(OAuth2GrantType.Value.ToString()); + } + if (Optional.IsCollectionDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static AuthorizationContractData DeserializeAuthorizationContractData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional authorizationType = default; + Optional oauth2grantType = default; + Optional> parameters = default; + Optional error = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("authorizationType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + authorizationType = new AuthorizationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("oauth2grantType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + oauth2grantType = new OAuth2GrantType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("parameters"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, property1.Value.GetString()); + } + parameters = dictionary; + continue; + } + if (property0.NameEquals("error"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + error = AuthorizationError.DeserializeAuthorizationError(property0.Value); + continue; + } + if (property0.NameEquals("status"u8)) + { + status = property0.Value.GetString(); + continue; + } + } + continue; + } + } + return new AuthorizationContractData(id, name, type, systemData.Value, Optional.ToNullable(authorizationType), Optional.ToNullable(oauth2grantType), Optional.ToDictionary(parameters), error.Value, status.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationError.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationError.Serialization.cs new file mode 100644 index 0000000000000..288ab2e5f0b71 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationError.Serialization.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class AuthorizationError : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + writer.WriteEndObject(); + } + + internal static AuthorizationError DeserializeAuthorizationError(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional code = default; + Optional message = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + } + return new AuthorizationError(code.Value, message.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationError.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationError.cs new file mode 100644 index 0000000000000..af963389ace2b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationError.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Authorization error details. + public partial class AuthorizationError + { + /// Initializes a new instance of AuthorizationError. + public AuthorizationError() + { + } + + /// Initializes a new instance of AuthorizationError. + /// Error code. + /// Error message. + internal AuthorizationError(string code, string message) + { + Code = code; + Message = message; + } + + /// Error code. + public string Code { get; set; } + /// Error message. + public string Message { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.Serialization.cs new file mode 100644 index 0000000000000..c9dfd11459b3c --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.Serialization.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ApiManagement; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class AuthorizationListResult + { + internal static AuthorizationListResult DeserializeAuthorizationListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional count = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthorizationContractData.DeserializeAuthorizationContractData(item)); + } + value = array; + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + count = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new AuthorizationListResult(Optional.ToList(value), Optional.ToNullable(count), nextLink.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.cs new file mode 100644 index 0000000000000..8edfa4a5a84ba --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ApiManagement; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Paged Authorization list representation. + internal partial class AuthorizationListResult + { + /// Initializes a new instance of AuthorizationListResult. + internal AuthorizationListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of AuthorizationListResult. + /// Page values. + /// Total record count number across all pages. + /// Next page link if any. + internal AuthorizationListResult(IReadOnlyList value, long? count, string nextLink) + { + Value = value; + Count = count; + NextLink = nextLink; + } + + /// Page values. + public IReadOnlyList Value { get; } + /// Total record count number across all pages. + public long? Count { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginRequestContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginRequestContract.Serialization.cs new file mode 100644 index 0000000000000..6e3fab6ca8044 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginRequestContract.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class AuthorizationLoginRequestContract : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(PostLoginRedirectUri)) + { + writer.WritePropertyName("postLoginRedirectUrl"u8); + writer.WriteStringValue(PostLoginRedirectUri.AbsoluteUri); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginRequestContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginRequestContract.cs new file mode 100644 index 0000000000000..d1348dee02eee --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginRequestContract.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Authorization login request contract. + public partial class AuthorizationLoginRequestContract + { + /// Initializes a new instance of AuthorizationLoginRequestContract. + public AuthorizationLoginRequestContract() + { + } + + /// The redirect URL after login has completed. + public Uri PostLoginRedirectUri { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResponseContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResponseContract.Serialization.cs new file mode 100644 index 0000000000000..893542009f586 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResponseContract.Serialization.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class AuthorizationLoginResponseContract + { + internal static AuthorizationLoginResponseContract DeserializeAuthorizationLoginResponseContract(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional loginLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("loginLink"u8)) + { + loginLink = property.Value.GetString(); + continue; + } + } + return new AuthorizationLoginResponseContract(loginLink.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResponseContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResponseContract.cs new file mode 100644 index 0000000000000..d6078e8f864ba --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResponseContract.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Authorization login response contract. + public partial class AuthorizationLoginResponseContract + { + /// Initializes a new instance of AuthorizationLoginResponseContract. + internal AuthorizationLoginResponseContract() + { + } + + /// Initializes a new instance of AuthorizationLoginResponseContract. + /// The login link. + internal AuthorizationLoginResponseContract(string loginLink) + { + LoginLink = loginLink; + } + + /// The login link. + public string LoginLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderContractData.Serialization.cs new file mode 100644 index 0000000000000..1e05d010b27ab --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderContractData.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class AuthorizationProviderContractData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(IdentityProvider)) + { + writer.WritePropertyName("identityProvider"u8); + writer.WriteStringValue(IdentityProvider); + } + if (Optional.IsDefined(Oauth2)) + { + writer.WritePropertyName("oauth2"u8); + writer.WriteObjectValue(Oauth2); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static AuthorizationProviderContractData DeserializeAuthorizationProviderContractData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional displayName = default; + Optional identityProvider = default; + Optional oauth2 = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("identityProvider"u8)) + { + identityProvider = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("oauth2"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + oauth2 = AuthorizationProviderOAuth2Settings.DeserializeAuthorizationProviderOAuth2Settings(property0.Value); + continue; + } + } + continue; + } + } + return new AuthorizationProviderContractData(id, name, type, systemData.Value, displayName.Value, identityProvider.Value, oauth2.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.Serialization.cs new file mode 100644 index 0000000000000..9652e85692195 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ApiManagement; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class AuthorizationProviderListResult + { + internal static AuthorizationProviderListResult DeserializeAuthorizationProviderListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new AuthorizationProviderListResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.cs new file mode 100644 index 0000000000000..285d20ef06179 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ApiManagement; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Paged Authorization Provider list representation. + internal partial class AuthorizationProviderListResult + { + /// Initializes a new instance of AuthorizationProviderListResult. + internal AuthorizationProviderListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of AuthorizationProviderListResult. + /// Page values. + /// Next page link if any. + internal AuthorizationProviderListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Page values. + public IReadOnlyList Value { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.Serialization.cs new file mode 100644 index 0000000000000..10831cf00902f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.Serialization.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class AuthorizationProviderOAuth2GrantTypes : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(AuthorizationCode)) + { + writer.WritePropertyName("authorizationCode"u8); + writer.WriteStartObject(); + foreach (var item in AuthorizationCode) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(ClientCredentials)) + { + writer.WritePropertyName("clientCredentials"u8); + writer.WriteStartObject(); + foreach (var item in ClientCredentials) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static AuthorizationProviderOAuth2GrantTypes DeserializeAuthorizationProviderOAuth2GrantTypes(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> authorizationCode = default; + Optional> clientCredentials = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authorizationCode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + authorizationCode = dictionary; + continue; + } + if (property.NameEquals("clientCredentials"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + clientCredentials = dictionary; + continue; + } + } + return new AuthorizationProviderOAuth2GrantTypes(Optional.ToDictionary(authorizationCode), Optional.ToDictionary(clientCredentials)); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.cs new file mode 100644 index 0000000000000..289cc7021fe23 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Authorization Provider oauth2 grant types settings. + public partial class AuthorizationProviderOAuth2GrantTypes + { + /// Initializes a new instance of AuthorizationProviderOAuth2GrantTypes. + public AuthorizationProviderOAuth2GrantTypes() + { + AuthorizationCode = new ChangeTrackingDictionary(); + ClientCredentials = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of AuthorizationProviderOAuth2GrantTypes. + /// OAuth2 authorization code grant parameters. + /// OAuth2 client credential grant parameters. + internal AuthorizationProviderOAuth2GrantTypes(IDictionary authorizationCode, IDictionary clientCredentials) + { + AuthorizationCode = authorizationCode; + ClientCredentials = clientCredentials; + } + + /// OAuth2 authorization code grant parameters. + public IDictionary AuthorizationCode { get; } + /// OAuth2 client credential grant parameters. + public IDictionary ClientCredentials { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.Serialization.cs new file mode 100644 index 0000000000000..03d1aae044aae --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class AuthorizationProviderOAuth2Settings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(RedirectUri)) + { + writer.WritePropertyName("redirectUrl"u8); + writer.WriteStringValue(RedirectUri.AbsoluteUri); + } + if (Optional.IsDefined(GrantTypes)) + { + writer.WritePropertyName("grantTypes"u8); + writer.WriteObjectValue(GrantTypes); + } + writer.WriteEndObject(); + } + + internal static AuthorizationProviderOAuth2Settings DeserializeAuthorizationProviderOAuth2Settings(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional redirectUri = default; + Optional grantTypes = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("redirectUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + redirectUri = null; + continue; + } + redirectUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("grantTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + grantTypes = AuthorizationProviderOAuth2GrantTypes.DeserializeAuthorizationProviderOAuth2GrantTypes(property.Value); + continue; + } + } + return new AuthorizationProviderOAuth2Settings(redirectUri.Value, grantTypes.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.cs new file mode 100644 index 0000000000000..699611f498a98 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// OAuth2 settings details. + public partial class AuthorizationProviderOAuth2Settings + { + /// Initializes a new instance of AuthorizationProviderOAuth2Settings. + public AuthorizationProviderOAuth2Settings() + { + } + + /// Initializes a new instance of AuthorizationProviderOAuth2Settings. + /// Redirect URL to be set in the OAuth application. + /// OAuth2 settings. + internal AuthorizationProviderOAuth2Settings(Uri redirectUri, AuthorizationProviderOAuth2GrantTypes grantTypes) + { + RedirectUri = redirectUri; + GrantTypes = grantTypes; + } + + /// Redirect URL to be set in the OAuth application. + public Uri RedirectUri { get; set; } + /// OAuth2 settings. + public AuthorizationProviderOAuth2GrantTypes GrantTypes { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationType.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationType.cs new file mode 100644 index 0000000000000..f848a82a20579 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Authorization type options. + public readonly partial struct AuthorizationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AuthorizationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OAuth2Value = "OAuth2"; + + /// OAuth2 authorization type. + public static AuthorizationType OAuth2 { get; } = new AuthorizationType(OAuth2Value); + /// Determines if two values are the same. + public static bool operator ==(AuthorizationType left, AuthorizationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AuthorizationType left, AuthorizationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AuthorizationType(string value) => new AuthorizationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AuthorizationType other && Equals(other); + /// + public bool Equals(AuthorizationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractData.Serialization.cs new file mode 100644 index 0000000000000..3b207fc7f9452 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractData.Serialization.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class DocumentationContractData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Title)) + { + writer.WritePropertyName("title"u8); + writer.WriteStringValue(Title); + } + if (Optional.IsDefined(Content)) + { + writer.WritePropertyName("content"u8); + writer.WriteStringValue(Content); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static DocumentationContractData DeserializeDocumentationContractData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional title = default; + Optional content = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("title"u8)) + { + title = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("content"u8)) + { + content = property0.Value.GetString(); + continue; + } + } + continue; + } + } + return new DocumentationContractData(id, name, type, systemData.Value, title.Value, content.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.Serialization.cs new file mode 100644 index 0000000000000..7619a2d67315c --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.Serialization.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class DocumentationContractPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Title)) + { + writer.WritePropertyName("title"u8); + writer.WriteStringValue(Title); + } + if (Optional.IsDefined(Content)) + { + writer.WritePropertyName("content"u8); + writer.WriteStringValue(Content); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.cs new file mode 100644 index 0000000000000..be0b6edf9ab86 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Documentation update contract details. + public partial class DocumentationContractPatch + { + /// Initializes a new instance of DocumentationContractPatch. + public DocumentationContractPatch() + { + } + + /// documentation title. + public string Title { get; set; } + /// Markdown documentation content. + public string Content { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.Serialization.cs new file mode 100644 index 0000000000000..aea695113f323 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ApiManagement; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class DocumentationListResult + { + internal static DocumentationListResult DeserializeDocumentationListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentationContractData.DeserializeDocumentationContractData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new DocumentationListResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.cs new file mode 100644 index 0000000000000..ab191948a4e58 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ApiManagement; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Paged Documentation list representation. + internal partial class DocumentationListResult + { + /// Initializes a new instance of DocumentationListResult. + internal DocumentationListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of DocumentationListResult. + /// Page values. + /// Next page link if any. + internal DocumentationListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Page values. + public IReadOnlyList Value { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.cs index 1c271a26f333d..b65f65bde6c56 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.cs @@ -32,7 +32,7 @@ public HostnameConfiguration(HostnameType hostnameType, string hostName) /// System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing the SSL certificate. /// Base64 Encoded certificate. /// Certificate Password. - /// Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to Proxy Hostname Type. + /// Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to gateway Hostname Type. /// Specify true to always negotiate client certificate on the hostname. Default Value is false. /// Certificate information. /// Certificate Source. @@ -64,7 +64,7 @@ internal HostnameConfiguration(HostnameType hostnameType, string hostName, Uri k public string EncodedCertificate { get; set; } /// Certificate Password. public string CertificatePassword { get; set; } - /// Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to Proxy Hostname Type. + /// Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to gateway Hostname Type. public bool? IsDefaultSslBindingEnabled { get; set; } /// Specify true to always negotiate client certificate on the hostname. Default Value is false. public bool? IsClientCertificateNegotiationEnabled { get; set; } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NatGatewayState.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NatGatewayState.cs new file mode 100644 index 0000000000000..8756121a42d90 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NatGatewayState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Property can be used to enable NAT Gateway for this API Management service. + public readonly partial struct NatGatewayState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NatGatewayState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Nat Gateway is enabled for the service. + public static NatGatewayState Enabled { get; } = new NatGatewayState(EnabledValue); + /// Nat Gateway is disabled for the service. + public static NatGatewayState Disabled { get; } = new NatGatewayState(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(NatGatewayState left, NatGatewayState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NatGatewayState left, NatGatewayState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NatGatewayState(string value) => new NatGatewayState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NatGatewayState other && Equals(other); + /// + public bool Equals(NatGatewayState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2GrantType.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2GrantType.cs new file mode 100644 index 0000000000000..acc48bc79ee3c --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2GrantType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// OAuth2 grant type options. + public readonly partial struct OAuth2GrantType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OAuth2GrantType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AuthorizationCodeValue = "AuthorizationCode"; + private const string ClientCredentialsValue = "ClientCredentials"; + + /// Authorization Code grant. + public static OAuth2GrantType AuthorizationCode { get; } = new OAuth2GrantType(AuthorizationCodeValue); + /// Client Credential grant. + public static OAuth2GrantType ClientCredentials { get; } = new OAuth2GrantType(ClientCredentialsValue); + /// Determines if two values are the same. + public static bool operator ==(OAuth2GrantType left, OAuth2GrantType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OAuth2GrantType left, OAuth2GrantType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OAuth2GrantType(string value) => new OAuth2GrantType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OAuth2GrantType other && Equals(other); + /// + public bool Equals(OAuth2GrantType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyContentFormat.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyContentFormat.cs index 7d40ffeb473a6..3c1b480e45f8b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyContentFormat.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyContentFormat.cs @@ -29,11 +29,11 @@ public PolicyContentFormat(string value) /// The contents are inline and Content type is an XML document. public static PolicyContentFormat Xml { get; } = new PolicyContentFormat(XmlValue); - /// The policy XML document is hosted on a http endpoint accessible from the API Management service. + /// The policy XML document is hosted on a HTTP endpoint accessible from the API Management service. public static PolicyContentFormat XmlLink { get; } = new PolicyContentFormat(XmlLinkValue); /// The contents are inline and Content type is a non XML encoded policy document. public static PolicyContentFormat RawXml { get; } = new PolicyContentFormat(RawXmlValue); - /// The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API Management service. + /// The policy document is not XML encoded and is hosted on a HTTP endpoint accessible from the API Management service. public static PolicyContentFormat RawXmlLink { get; } = new PolicyContentFormat(RawXmlLinkValue); /// Determines if two values are the same. public static bool operator ==(PolicyContentFormat left, PolicyContentFormat right) => left.Equals(right); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.cs index 63ae26c58e450..f34fa7882e897 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ApiManagement.Models { - /// Descriptions of APIM policies. + /// Descriptions of API Management policies. internal partial class PolicyDescriptionListResult { /// Initializes a new instance of PolicyDescriptionListResult. @@ -20,7 +20,7 @@ internal PolicyDescriptionListResult() } /// Initializes a new instance of PolicyDescriptionListResult. - /// Descriptions of APIM policies. + /// Descriptions of API Management policies. /// Total record count number. internal PolicyDescriptionListResult(IReadOnlyList value, long? count) { @@ -28,7 +28,7 @@ internal PolicyDescriptionListResult(IReadOnlyList Descriptions of APIM policies. + /// Descriptions of API Management policies. public IReadOnlyList Value { get; } /// Total record count number. public long? Count { get; } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentContentFormat.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentContentFormat.cs new file mode 100644 index 0000000000000..ea423856a7f86 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentContentFormat.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The PolicyFragmentContentFormat. + public readonly partial struct PolicyFragmentContentFormat : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PolicyFragmentContentFormat(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string XmlValue = "xml"; + private const string RawxmlValue = "rawxml"; + + /// The contents are inline and Content type is an XML document. + public static PolicyFragmentContentFormat Xml { get; } = new PolicyFragmentContentFormat(XmlValue); + /// The contents are inline and Content type is a non XML encoded policy document. + public static PolicyFragmentContentFormat Rawxml { get; } = new PolicyFragmentContentFormat(RawxmlValue); + /// Determines if two values are the same. + public static bool operator ==(PolicyFragmentContentFormat left, PolicyFragmentContentFormat right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PolicyFragmentContentFormat left, PolicyFragmentContentFormat right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PolicyFragmentContentFormat(string value) => new PolicyFragmentContentFormat(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PolicyFragmentContentFormat other && Equals(other); + /// + public bool Equals(PolicyFragmentContentFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentContractData.Serialization.cs new file mode 100644 index 0000000000000..954bbd0635fe9 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentContractData.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class PolicyFragmentContractData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Format)) + { + writer.WritePropertyName("format"u8); + writer.WriteStringValue(Format.Value.ToString()); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static PolicyFragmentContractData DeserializePolicyFragmentContractData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional value = default; + Optional description = default; + Optional format = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("value"u8)) + { + value = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("description"u8)) + { + description = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("format"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + format = new PolicyFragmentContentFormat(property0.Value.GetString()); + continue; + } + } + continue; + } + } + return new PolicyFragmentContractData(id, name, type, systemData.Value, value.Value, description.Value, Optional.ToNullable(format)); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.Serialization.cs new file mode 100644 index 0000000000000..fda2fe24e28ea --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.Serialization.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ApiManagement; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class PolicyFragmentListResult + { + internal static PolicyFragmentListResult DeserializePolicyFragmentListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional count = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PolicyFragmentContractData.DeserializePolicyFragmentContractData(item)); + } + value = array; + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + count = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new PolicyFragmentListResult(Optional.ToList(value), Optional.ToNullable(count), nextLink.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.cs new file mode 100644 index 0000000000000..2beaa8c976b0c --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ApiManagement; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The response of the get policy fragments operation. + internal partial class PolicyFragmentListResult + { + /// Initializes a new instance of PolicyFragmentListResult. + internal PolicyFragmentListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of PolicyFragmentListResult. + /// Policy fragment contract value. + /// Total record count number. + /// Next page link if any. + internal PolicyFragmentListResult(IReadOnlyList value, long? count, string nextLink) + { + Value = value; + Count = count; + NextLink = nextLink; + } + + /// Policy fragment contract value. + public IReadOnlyList Value { get; } + /// Total record count number. + public long? Count { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigContractData.Serialization.cs new file mode 100644 index 0000000000000..143f60badd9bc --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigContractData.Serialization.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class PortalConfigContractData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(EnableBasicAuth)) + { + writer.WritePropertyName("enableBasicAuth"u8); + writer.WriteBooleanValue(EnableBasicAuth.Value); + } + if (Optional.IsDefined(Signin)) + { + writer.WritePropertyName("signin"u8); + writer.WriteObjectValue(Signin); + } + if (Optional.IsDefined(Signup)) + { + writer.WritePropertyName("signup"u8); + writer.WriteObjectValue(Signup); + } + if (Optional.IsDefined(Delegation)) + { + writer.WritePropertyName("delegation"u8); + writer.WriteObjectValue(Delegation); + } + if (Optional.IsDefined(Cors)) + { + writer.WritePropertyName("cors"u8); + writer.WriteObjectValue(Cors); + } + if (Optional.IsDefined(Csp)) + { + writer.WritePropertyName("csp"u8); + writer.WriteObjectValue(Csp); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static PortalConfigContractData DeserializePortalConfigContractData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional enableBasicAuth = default; + Optional signin = default; + Optional signup = default; + Optional delegation = default; + Optional cors = default; + Optional csp = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("enableBasicAuth"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + enableBasicAuth = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("signin"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + signin = PortalConfigPropertiesSignin.DeserializePortalConfigPropertiesSignin(property0.Value); + continue; + } + if (property0.NameEquals("signup"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + signup = PortalConfigPropertiesSignup.DeserializePortalConfigPropertiesSignup(property0.Value); + continue; + } + if (property0.NameEquals("delegation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + delegation = PortalConfigDelegationProperties.DeserializePortalConfigDelegationProperties(property0.Value); + continue; + } + if (property0.NameEquals("cors"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + cors = PortalConfigCorsProperties.DeserializePortalConfigCorsProperties(property0.Value); + continue; + } + if (property0.NameEquals("csp"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + csp = PortalConfigCspProperties.DeserializePortalConfigCspProperties(property0.Value); + continue; + } + } + continue; + } + } + return new PortalConfigContractData(id, name, type, systemData.Value, Optional.ToNullable(enableBasicAuth), signin.Value, signup.Value, delegation.Value, cors.Value, csp.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.Serialization.cs new file mode 100644 index 0000000000000..7b401ab49c163 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class PortalConfigCorsProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(AllowedOrigins)) + { + writer.WritePropertyName("allowedOrigins"u8); + writer.WriteStartArray(); + foreach (var item in AllowedOrigins) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static PortalConfigCorsProperties DeserializePortalConfigCorsProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> allowedOrigins = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("allowedOrigins"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedOrigins = array; + continue; + } + } + return new PortalConfigCorsProperties(Optional.ToList(allowedOrigins)); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.cs new file mode 100644 index 0000000000000..8eef66d436f71 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The developer portal Cross-Origin Resource Sharing (CORS) settings. + internal partial class PortalConfigCorsProperties + { + /// Initializes a new instance of PortalConfigCorsProperties. + public PortalConfigCorsProperties() + { + AllowedOrigins = new ChangeTrackingList(); + } + + /// Initializes a new instance of PortalConfigCorsProperties. + /// Allowed origins, e.g. `https://trusted.com`. + internal PortalConfigCorsProperties(IList allowedOrigins) + { + AllowedOrigins = allowedOrigins; + } + + /// Allowed origins, e.g. `https://trusted.com`. + public IList AllowedOrigins { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.Serialization.cs new file mode 100644 index 0000000000000..f7607ab132cb5 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.Serialization.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class PortalConfigCspProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsCollectionDefined(ReportUri)) + { + writer.WritePropertyName("reportUri"u8); + writer.WriteStartArray(); + foreach (var item in ReportUri) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.AbsoluteUri); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(AllowedSources)) + { + writer.WritePropertyName("allowedSources"u8); + writer.WriteStartArray(); + foreach (var item in AllowedSources) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static PortalConfigCspProperties DeserializePortalConfigCspProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional mode = default; + Optional> reportUri = default; + Optional> allowedSources = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mode = new PortalSettingsCspMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("reportUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new Uri(item.GetString())); + } + } + reportUri = array; + continue; + } + if (property.NameEquals("allowedSources"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedSources = array; + continue; + } + } + return new PortalConfigCspProperties(Optional.ToNullable(mode), Optional.ToList(reportUri), Optional.ToList(allowedSources)); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.cs new file mode 100644 index 0000000000000..2b34917ba4bba --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The developer portal Content Security Policy (CSP) settings. + public partial class PortalConfigCspProperties + { + /// Initializes a new instance of PortalConfigCspProperties. + public PortalConfigCspProperties() + { + ReportUri = new ChangeTrackingList(); + AllowedSources = new ChangeTrackingList(); + } + + /// Initializes a new instance of PortalConfigCspProperties. + /// The mode of the developer portal Content Security Policy (CSP). + /// The URLs used by the browser to report CSP violations. + /// Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`. + internal PortalConfigCspProperties(PortalSettingsCspMode? mode, IList reportUri, IList allowedSources) + { + Mode = mode; + ReportUri = reportUri; + AllowedSources = allowedSources; + } + + /// The mode of the developer portal Content Security Policy (CSP). + public PortalSettingsCspMode? Mode { get; set; } + /// The URLs used by the browser to report CSP violations. + public IList ReportUri { get; } + /// Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`. + public IList AllowedSources { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.Serialization.cs new file mode 100644 index 0000000000000..2e33c9d8bdf5a --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.Serialization.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class PortalConfigDelegationProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DelegateRegistration)) + { + writer.WritePropertyName("delegateRegistration"u8); + writer.WriteBooleanValue(DelegateRegistration.Value); + } + if (Optional.IsDefined(DelegateSubscription)) + { + writer.WritePropertyName("delegateSubscription"u8); + writer.WriteBooleanValue(DelegateSubscription.Value); + } + if (Optional.IsDefined(DelegationUri)) + { + writer.WritePropertyName("delegationUrl"u8); + writer.WriteStringValue(DelegationUri.AbsoluteUri); + } + if (Optional.IsDefined(ValidationKey)) + { + writer.WritePropertyName("validationKey"u8); + writer.WriteStringValue(ValidationKey); + } + writer.WriteEndObject(); + } + + internal static PortalConfigDelegationProperties DeserializePortalConfigDelegationProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional delegateRegistration = default; + Optional delegateSubscription = default; + Optional delegationUri = default; + Optional validationKey = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("delegateRegistration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + delegateRegistration = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("delegateSubscription"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + delegateSubscription = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("delegationUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + delegationUri = null; + continue; + } + delegationUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("validationKey"u8)) + { + validationKey = property.Value.GetString(); + continue; + } + } + return new PortalConfigDelegationProperties(Optional.ToNullable(delegateRegistration), Optional.ToNullable(delegateSubscription), delegationUri.Value, validationKey.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.cs new file mode 100644 index 0000000000000..1e12488f90dc6 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The PortalConfigDelegationProperties. + public partial class PortalConfigDelegationProperties + { + /// Initializes a new instance of PortalConfigDelegationProperties. + public PortalConfigDelegationProperties() + { + } + + /// Initializes a new instance of PortalConfigDelegationProperties. + /// Enable or disable delegation for user registration. + /// Enable or disable delegation for product subscriptions. + /// A delegation endpoint URL. + /// A base64-encoded validation key to ensure requests originate from Azure API Management service. + internal PortalConfigDelegationProperties(bool? delegateRegistration, bool? delegateSubscription, Uri delegationUri, string validationKey) + { + DelegateRegistration = delegateRegistration; + DelegateSubscription = delegateSubscription; + DelegationUri = delegationUri; + ValidationKey = validationKey; + } + + /// Enable or disable delegation for user registration. + public bool? DelegateRegistration { get; set; } + /// Enable or disable delegation for product subscriptions. + public bool? DelegateSubscription { get; set; } + /// A delegation endpoint URL. + public Uri DelegationUri { get; set; } + /// A base64-encoded validation key to ensure requests originate from Azure API Management service. + public string ValidationKey { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.Serialization.cs new file mode 100644 index 0000000000000..02538b705d552 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ApiManagement; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class PortalConfigListResult + { + internal static PortalConfigListResult DeserializePortalConfigListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PortalConfigContractData.DeserializePortalConfigContractData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new PortalConfigListResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.cs new file mode 100644 index 0000000000000..fa9cd2890e079 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ApiManagement; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The collection of the developer portal configurations. + internal partial class PortalConfigListResult + { + /// Initializes a new instance of PortalConfigListResult. + internal PortalConfigListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of PortalConfigListResult. + /// The developer portal configurations. + /// Next page link if any. + internal PortalConfigListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// The developer portal configurations. + public IReadOnlyList Value { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.Serialization.cs new file mode 100644 index 0000000000000..d291e66f6d6e4 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class PortalConfigPropertiesSignin : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Require)) + { + writer.WritePropertyName("require"u8); + writer.WriteBooleanValue(Require.Value); + } + writer.WriteEndObject(); + } + + internal static PortalConfigPropertiesSignin DeserializePortalConfigPropertiesSignin(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional require = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("require"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + require = property.Value.GetBoolean(); + continue; + } + } + return new PortalConfigPropertiesSignin(Optional.ToNullable(require)); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.cs new file mode 100644 index 0000000000000..322c6a765649f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The PortalConfigPropertiesSignin. + internal partial class PortalConfigPropertiesSignin + { + /// Initializes a new instance of PortalConfigPropertiesSignin. + public PortalConfigPropertiesSignin() + { + } + + /// Initializes a new instance of PortalConfigPropertiesSignin. + /// Redirect anonymous users to the sign-in page. + internal PortalConfigPropertiesSignin(bool? require) + { + Require = require; + } + + /// Redirect anonymous users to the sign-in page. + public bool? Require { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.Serialization.cs new file mode 100644 index 0000000000000..81aa6c66f17e7 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class PortalConfigPropertiesSignup : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(TermsOfService)) + { + writer.WritePropertyName("termsOfService"u8); + writer.WriteObjectValue(TermsOfService); + } + writer.WriteEndObject(); + } + + internal static PortalConfigPropertiesSignup DeserializePortalConfigPropertiesSignup(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional termsOfService = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("termsOfService"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + termsOfService = PortalConfigTermsOfServiceProperties.DeserializePortalConfigTermsOfServiceProperties(property.Value); + continue; + } + } + return new PortalConfigPropertiesSignup(termsOfService.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.cs new file mode 100644 index 0000000000000..72ca13a0aa3dd --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The PortalConfigPropertiesSignup. + internal partial class PortalConfigPropertiesSignup + { + /// Initializes a new instance of PortalConfigPropertiesSignup. + public PortalConfigPropertiesSignup() + { + } + + /// Initializes a new instance of PortalConfigPropertiesSignup. + /// Terms of service settings. + internal PortalConfigPropertiesSignup(PortalConfigTermsOfServiceProperties termsOfService) + { + TermsOfService = termsOfService; + } + + /// Terms of service settings. + public PortalConfigTermsOfServiceProperties TermsOfService { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.Serialization.cs new file mode 100644 index 0000000000000..2af55ea990672 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class PortalConfigTermsOfServiceProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Text)) + { + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + } + if (Optional.IsDefined(RequireConsent)) + { + writer.WritePropertyName("requireConsent"u8); + writer.WriteBooleanValue(RequireConsent.Value); + } + writer.WriteEndObject(); + } + + internal static PortalConfigTermsOfServiceProperties DeserializePortalConfigTermsOfServiceProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional text = default; + Optional requireConsent = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("text"u8)) + { + text = property.Value.GetString(); + continue; + } + if (property.NameEquals("requireConsent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + requireConsent = property.Value.GetBoolean(); + continue; + } + } + return new PortalConfigTermsOfServiceProperties(text.Value, Optional.ToNullable(requireConsent)); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.cs new file mode 100644 index 0000000000000..68784e4691e1a --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Terms of service contract properties. + public partial class PortalConfigTermsOfServiceProperties + { + /// Initializes a new instance of PortalConfigTermsOfServiceProperties. + public PortalConfigTermsOfServiceProperties() + { + } + + /// Initializes a new instance of PortalConfigTermsOfServiceProperties. + /// A terms of service text. + /// Ask user for consent to the terms of service. + internal PortalConfigTermsOfServiceProperties(string text, bool? requireConsent) + { + Text = text; + RequireConsent = requireConsent; + } + + /// A terms of service text. + public string Text { get; set; } + /// Ask user for consent to the terms of service. + public bool? RequireConsent { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsCspMode.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsCspMode.cs new file mode 100644 index 0000000000000..a8207a74e07ac --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsCspMode.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The mode of the developer portal Content Security Policy (CSP). + public readonly partial struct PortalSettingsCspMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PortalSettingsCspMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "enabled"; + private const string DisabledValue = "disabled"; + private const string ReportOnlyValue = "reportOnly"; + + /// The browser will block requests not matching allowed origins. + public static PortalSettingsCspMode Enabled { get; } = new PortalSettingsCspMode(EnabledValue); + /// The browser will not apply the origin restrictions. + public static PortalSettingsCspMode Disabled { get; } = new PortalSettingsCspMode(DisabledValue); + /// The browser will report requests not matching allowed origins without blocking them. + public static PortalSettingsCspMode ReportOnly { get; } = new PortalSettingsCspMode(ReportOnlyValue); + /// Determines if two values are the same. + public static bool operator ==(PortalSettingsCspMode left, PortalSettingsCspMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PortalSettingsCspMode left, PortalSettingsCspMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PortalSettingsCspMode(string value) => new PortalSettingsCspMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PortalSettingsCspMode other && Equals(other); + /// + public bool Equals(PortalSettingsCspMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.cs index e7d87aa1f9742..7644d8039b35d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ApiManagement.Models { - /// Descriptions of APIM policies. + /// Descriptions of API Management policies. internal partial class PortalSettingsListResult { /// Initializes a new instance of PortalSettingsListResult. @@ -20,7 +20,7 @@ internal PortalSettingsListResult() } /// Initializes a new instance of PortalSettingsListResult. - /// Descriptions of APIM policies. + /// Descriptions of API Management policies. /// Total record count number. internal PortalSettingsListResult(IReadOnlyList value, long? count) { @@ -28,7 +28,7 @@ internal PortalSettingsListResult(IReadOnlyList valu Count = count; } - /// Descriptions of APIM policies. + /// Descriptions of API Management policies. public IReadOnlyList Value { get; } /// Total record count number. public long? Count { get; } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.cs index aa712d6e24ce6..d142ec69e286e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.cs @@ -36,7 +36,7 @@ internal ReportRecordContract() /// Subscription identifier path. /subscriptions/{subscriptionId}. /// Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect. /// Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests. - /// Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600. + /// Number of calls failed due to gateway or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600. /// Number of other calls. /// Total number of calls. /// Bandwidth consumed. @@ -109,7 +109,7 @@ internal ReportRecordContract(string name, DateTimeOffset? timestamp, string int public int? CallCountSuccess { get; } /// Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests. public int? CallCountBlocked { get; } - /// Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600. + /// Number of calls failed due to gateway or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600. public int? CallCountFailed { get; } /// Number of other calls. public int? CallCountOther { get; } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractData.Serialization.cs new file mode 100644 index 0000000000000..d195c26b0449e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractData.Serialization.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class ResolverContractData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static ResolverContractData DeserializeResolverContractData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional displayName = default; + Optional path = default; + Optional description = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("path"u8)) + { + path = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("description"u8)) + { + description = property0.Value.GetString(); + continue; + } + } + continue; + } + } + return new ResolverContractData(id, name, type, systemData.Value, displayName.Value, path.Value, description.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.Serialization.cs new file mode 100644 index 0000000000000..bbd86e09f5a28 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class ResolverContractPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.cs new file mode 100644 index 0000000000000..99d9c60be1a79 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// GraphQL API Resolver Update Contract details. + public partial class ResolverContractPatch + { + /// Initializes a new instance of ResolverContractPatch. + public ResolverContractPatch() + { + } + + /// Resolver Name. + public string DisplayName { get; set; } + /// Path is type/field being resolved. + public string Path { get; set; } + /// Description of the resolver. May include HTML formatting tags. + public string Description { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.Serialization.cs new file mode 100644 index 0000000000000..9a7c8d9b5418e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.Serialization.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ApiManagement; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class ResolverListResult + { + internal static ResolverListResult DeserializeResolverListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional count = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResolverContractData.DeserializeResolverContractData(item)); + } + value = array; + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + count = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ResolverListResult(Optional.ToList(value), Optional.ToNullable(count), nextLink.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.cs new file mode 100644 index 0000000000000..e55868baa3855 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ApiManagement; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Paged Resolver list representation. + internal partial class ResolverListResult + { + /// Initializes a new instance of ResolverListResult. + internal ResolverListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ResolverListResult. + /// Page values. + /// Total record count number across all pages. + /// Next page link if any. + internal ResolverListResult(IReadOnlyList value, long? count, string nextLink) + { + Value = value; + Count = count; + NextLink = nextLink; + } + + /// Page values. + public IReadOnlyList Value { get; } + /// Total record count number across all pages. + public long? Count { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.Serialization.cs new file mode 100644 index 0000000000000..a6adc0184de9a --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class ResourceCollectionValueItem : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } + + internal static ResourceCollectionValueItem DeserializeResourceCollectionValueItem(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new ResourceCollectionValueItem(id, name, type, systemData.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.cs new file mode 100644 index 0000000000000..ddabdfd047559 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The ResourceCollectionValueItem. + public partial class ResourceCollectionValueItem : ResourceData + { + /// Initializes a new instance of ResourceCollectionValueItem. + public ResourceCollectionValueItem() + { + } + + /// Initializes a new instance of ResourceCollectionValueItem. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + internal ResourceCollectionValueItem(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData) : base(id, name, resourceType, systemData) + { + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.Serialization.cs new file mode 100644 index 0000000000000..98f0215cff30d --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class ResourceListResult + { + internal static ResourceListResult DeserializeResourceListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional count = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceCollectionValueItem.DeserializeResourceCollectionValueItem(item)); + } + value = array; + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + count = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ResourceListResult(Optional.ToList(value), Optional.ToNullable(count), nextLink.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.cs new file mode 100644 index 0000000000000..c0c13e5193e0b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// A collection of resources. + internal partial class ResourceListResult + { + /// Initializes a new instance of ResourceListResult. + internal ResourceListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ResourceListResult. + /// A collection of resources. + /// Total record count number. + /// Next page link if any. + internal ResourceListResult(IReadOnlyList value, long? count, string nextLink) + { + Value = value; + Count = count; + NextLink = nextLink; + } + + /// A collection of resources. + public IReadOnlyList Value { get; } + /// Total record count number. + public long? Count { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TranslateRequiredQueryParametersConduct.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TranslateRequiredQueryParametersConduct.cs new file mode 100644 index 0000000000000..602e0a0691741 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TranslateRequiredQueryParametersConduct.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'. + public readonly partial struct TranslateRequiredQueryParametersConduct : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TranslateRequiredQueryParametersConduct(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TemplateValue = "template"; + private const string QueryValue = "query"; + + /// Translates required query parameters to template ones. Is a default value. + public static TranslateRequiredQueryParametersConduct Template { get; } = new TranslateRequiredQueryParametersConduct(TemplateValue); + /// Leaves required query parameters as they are (no translation done). + public static TranslateRequiredQueryParametersConduct Query { get; } = new TranslateRequiredQueryParametersConduct(QueryValue); + /// Determines if two values are the same. + public static bool operator ==(TranslateRequiredQueryParametersConduct left, TranslateRequiredQueryParametersConduct right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TranslateRequiredQueryParametersConduct left, TranslateRequiredQueryParametersConduct right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator TranslateRequiredQueryParametersConduct(string value) => new TranslateRequiredQueryParametersConduct(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TranslateRequiredQueryParametersConduct other && Equals(other); + /// + public bool Equals(TranslateRequiredQueryParametersConduct other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiContractData.Serialization.cs new file mode 100644 index 0000000000000..3f1d965df89f7 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiContractData.Serialization.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class WikiContractData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Documents)) + { + writer.WritePropertyName("documents"u8); + writer.WriteStartArray(); + foreach (var item in Documents) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static WikiContractData DeserializeWikiContractData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional> documents = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("documents"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(WikiDocumentationContract.DeserializeWikiDocumentationContract(item)); + } + documents = array; + continue; + } + } + continue; + } + } + return new WikiContractData(id, name, type, systemData.Value, Optional.ToList(documents)); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.Serialization.cs new file mode 100644 index 0000000000000..74e7b7e404318 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.Serialization.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class WikiDocumentationContract : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DocumentationId)) + { + writer.WritePropertyName("documentationId"u8); + writer.WriteStringValue(DocumentationId); + } + writer.WriteEndObject(); + } + + internal static WikiDocumentationContract DeserializeWikiDocumentationContract(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional documentationId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("documentationId"u8)) + { + documentationId = property.Value.GetString(); + continue; + } + } + return new WikiDocumentationContract(documentationId.Value); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.cs new file mode 100644 index 0000000000000..1ef9ececb1f48 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Wiki documentation details. + public partial class WikiDocumentationContract + { + /// Initializes a new instance of WikiDocumentationContract. + public WikiDocumentationContract() + { + } + + /// Initializes a new instance of WikiDocumentationContract. + /// Documentation Identifier. + internal WikiDocumentationContract(string documentationId) + { + DocumentationId = documentationId; + } + + /// Documentation Identifier. + public string DocumentationId { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.Serialization.cs new file mode 100644 index 0000000000000..9358fc04f6c14 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.Serialization.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class WikiUpdateContract : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Documents)) + { + writer.WritePropertyName("documents"u8); + writer.WriteStartArray(); + foreach (var item in Documents) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.cs new file mode 100644 index 0000000000000..78710135cafd9 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Wiki update contract details. + public partial class WikiUpdateContract + { + /// Initializes a new instance of WikiUpdateContract. + public WikiUpdateContract() + { + Documents = new ChangeTrackingList(); + } + + /// Collection wiki documents included into this wiki. + public IList Documents { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractCollection.cs new file mode 100644 index 0000000000000..2914e9e3f2929 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractCollection.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetPolicyFragmentContracts method from an instance of . + /// + public partial class PolicyFragmentContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _policyFragmentContractPolicyFragmentClientDiagnostics; + private readonly PolicyFragmentRestOperations _policyFragmentContractPolicyFragmentRestClient; + + /// Initializes a new instance of the class for mocking. + protected PolicyFragmentContractCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal PolicyFragmentContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _policyFragmentContractPolicyFragmentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", PolicyFragmentContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(PolicyFragmentContractResource.ResourceType, out string policyFragmentContractPolicyFragmentApiVersion); + _policyFragmentContractPolicyFragmentRestClient = new PolicyFragmentRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, policyFragmentContractPolicyFragmentApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApiManagementServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApiManagementServiceResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A resource identifier. + /// The policy fragment contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string id, PolicyFragmentContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, data, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(new PolicyFragmentContractOperationSource(Client), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, _policyFragmentContractPolicyFragmentRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, data, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A resource identifier. + /// The policy fragment contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string id, PolicyFragmentContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, data, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(new PolicyFragmentContractOperationSource(Client), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, _policyFragmentContractPolicyFragmentRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, data, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.Get"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, format, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PolicyFragmentContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.Get"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, format, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PolicyFragmentContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets all policy fragments. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments + /// + /// + /// Operation Id + /// PolicyFragment_ListByService + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// OData order by query option. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, string orderBy = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _policyFragmentContractPolicyFragmentRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, orderBy, top, skip); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new PolicyFragmentContractResource(Client, PolicyFragmentContractData.DeserializePolicyFragmentContractData(e)), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, "PolicyFragmentContractCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Gets all policy fragments. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments + /// + /// + /// Operation Id + /// PolicyFragment_ListByService + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// OData order by query option. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, string orderBy = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _policyFragmentContractPolicyFragmentRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, orderBy, top, skip); + return PageableHelpers.CreatePageable(FirstPageRequest, null, e => new PolicyFragmentContractResource(Client, PolicyFragmentContractData.DeserializePolicyFragmentContractData(e)), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, "PolicyFragmentContractCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.Exists"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, format, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.Exists"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, format, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.cs new file mode 100644 index 0000000000000..761a908448b86 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the PolicyFragmentContract data model. + /// Policy fragment contract details. + /// + public partial class PolicyFragmentContractData : ResourceData + { + /// Initializes a new instance of PolicyFragmentContractData. + public PolicyFragmentContractData() + { + } + + /// Initializes a new instance of PolicyFragmentContractData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Contents of the policy fragment. + /// Policy fragment description. + /// Format of the policy fragment content. + internal PolicyFragmentContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string value, string description, PolicyFragmentContentFormat? format) : base(id, name, resourceType, systemData) + { + Value = value; + Description = description; + Format = format; + } + + /// Contents of the policy fragment. + public string Value { get; set; } + /// Policy fragment description. + public string Description { get; set; } + /// Format of the policy fragment content. + public PolicyFragmentContentFormat? Format { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.cs new file mode 100644 index 0000000000000..3072a0e115ccd --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.cs @@ -0,0 +1,410 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a PolicyFragmentContract along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetPolicyFragmentContractResource method. + /// Otherwise you can get one from its parent resource using the GetPolicyFragmentContract method. + /// + public partial class PolicyFragmentContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string id) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _policyFragmentContractPolicyFragmentClientDiagnostics; + private readonly PolicyFragmentRestOperations _policyFragmentContractPolicyFragmentRestClient; + private readonly PolicyFragmentContractData _data; + + /// Initializes a new instance of the class for mocking. + protected PolicyFragmentContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal PolicyFragmentContractResource(ArmClient client, PolicyFragmentContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal PolicyFragmentContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _policyFragmentContractPolicyFragmentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string policyFragmentContractPolicyFragmentApiVersion); + _policyFragmentContractPolicyFragmentRestClient = new PolicyFragmentRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, policyFragmentContractPolicyFragmentApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/policyFragments"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual PolicyFragmentContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// + /// Policy fragment content format. + /// The cancellation token to use. + public virtual async Task> GetAsync(PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.Get"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, format, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PolicyFragmentContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// + /// Policy fragment content format. + /// The cancellation token to use. + public virtual Response Get(PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.Get"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, format, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PolicyFragmentContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.Delete"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.Delete"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The policy fragment contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PolicyFragmentContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.Update"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(new PolicyFragmentContractOperationSource(Client), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, _policyFragmentContractPolicyFragmentRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The policy fragment contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, PolicyFragmentContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.Update"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(new PolicyFragmentContractOperationSource(Client), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, _policyFragmentContractPolicyFragmentRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists policy resources that reference the policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}/listReferences + /// + /// + /// Operation Id + /// PolicyFragment_ListReferences + /// + /// + /// + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetReferencesAsync(int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _policyFragmentContractPolicyFragmentRestClient.CreateListReferencesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top, skip); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, ResourceCollectionValueItem.DeserializeResourceCollectionValueItem, _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, "PolicyFragmentContractResource.GetReferences", "value", null, cancellationToken); + } + + /// + /// Lists policy resources that reference the policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}/listReferences + /// + /// + /// Operation Id + /// PolicyFragment_ListReferences + /// + /// + /// + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetReferences(int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _policyFragmentContractPolicyFragmentRestClient.CreateListReferencesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top, skip); + return PageableHelpers.CreatePageable(FirstPageRequest, null, ResourceCollectionValueItem.DeserializeResourceCollectionValueItem, _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, "PolicyFragmentContractResource.GetReferences", "value", null, cancellationToken); + } + + /// + /// Gets the entity state (Etag) version of a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_GetEntityTag + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_GetEntityTag + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractCollection.cs new file mode 100644 index 0000000000000..5b02d9949a992 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractCollection.cs @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetPortalConfigContracts method from an instance of . + /// + public partial class PortalConfigContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _portalConfigContractPortalConfigClientDiagnostics; + private readonly PortalConfigRestOperations _portalConfigContractPortalConfigRestClient; + + /// Initializes a new instance of the class for mocking. + protected PortalConfigContractCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal PortalConfigContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _portalConfigContractPortalConfigClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", PortalConfigContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(PortalConfigContractResource.ResourceType, out string portalConfigContractPortalConfigApiVersion); + _portalConfigContractPortalConfigRestClient = new PortalConfigRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, portalConfigContractPortalConfigApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApiManagementServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApiManagementServiceResource.ResourceType), nameof(id)); + } + + /// + /// Create or update the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Portal configuration identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string portalConfigId, ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, ifMatch, data, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(Response.FromValue(new PortalConfigContractResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Portal configuration identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string portalConfigId, ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, ifMatch, data, cancellationToken); + var operation = new ApiManagementArmOperation(Response.FromValue(new PortalConfigContractResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.Get"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.Get"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the developer portal configurations. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs + /// + /// + /// Operation Id + /// PortalConfig_ListByService + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _portalConfigContractPortalConfigRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new PortalConfigContractResource(Client, PortalConfigContractData.DeserializePortalConfigContractData(e)), _portalConfigContractPortalConfigClientDiagnostics, Pipeline, "PortalConfigContractCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Lists the developer portal configurations. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs + /// + /// + /// Operation Id + /// PortalConfig_ListByService + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _portalConfigContractPortalConfigRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, null, e => new PortalConfigContractResource(Client, PortalConfigContractData.DeserializePortalConfigContractData(e)), _portalConfigContractPortalConfigClientDiagnostics, Pipeline, "PortalConfigContractCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.Exists"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.Exists"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractData.cs new file mode 100644 index 0000000000000..4f4073e61a376 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractData.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the PortalConfigContract data model. + /// The developer portal configuration contract. + /// + public partial class PortalConfigContractData : ResourceData + { + /// Initializes a new instance of PortalConfigContractData. + public PortalConfigContractData() + { + } + + /// Initializes a new instance of PortalConfigContractData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Enable or disable Basic authentication method. + /// + /// + /// The developer portal delegation settings. + /// The developer portal Cross-Origin Resource Sharing (CORS) settings. + /// The developer portal Content Security Policy (CSP) settings. + internal PortalConfigContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, bool? enableBasicAuth, PortalConfigPropertiesSignin signin, PortalConfigPropertiesSignup signup, PortalConfigDelegationProperties delegation, PortalConfigCorsProperties cors, PortalConfigCspProperties csp) : base(id, name, resourceType, systemData) + { + EnableBasicAuth = enableBasicAuth; + Signin = signin; + Signup = signup; + Delegation = delegation; + Cors = cors; + Csp = csp; + } + + /// Enable or disable Basic authentication method. + public bool? EnableBasicAuth { get; set; } + /// Gets or sets the signin. + internal PortalConfigPropertiesSignin Signin { get; set; } + /// Redirect anonymous users to the sign-in page. + public bool? Require + { + get => Signin is null ? default : Signin.Require; + set + { + if (Signin is null) + Signin = new PortalConfigPropertiesSignin(); + Signin.Require = value; + } + } + + /// Gets or sets the signup. + internal PortalConfigPropertiesSignup Signup { get; set; } + /// Terms of service settings. + public PortalConfigTermsOfServiceProperties SignupTermsOfService + { + get => Signup is null ? default : Signup.TermsOfService; + set + { + if (Signup is null) + Signup = new PortalConfigPropertiesSignup(); + Signup.TermsOfService = value; + } + } + + /// The developer portal delegation settings. + public PortalConfigDelegationProperties Delegation { get; set; } + /// The developer portal Cross-Origin Resource Sharing (CORS) settings. + internal PortalConfigCorsProperties Cors { get; set; } + /// Allowed origins, e.g. `https://trusted.com`. + public IList CorsAllowedOrigins + { + get + { + if (Cors is null) + Cors = new PortalConfigCorsProperties(); + return Cors.AllowedOrigins; + } + } + + /// The developer portal Content Security Policy (CSP) settings. + public PortalConfigCspProperties Csp { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.cs new file mode 100644 index 0000000000000..6d0540e9c9e53 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.cs @@ -0,0 +1,283 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a PortalConfigContract along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetPortalConfigContractResource method. + /// Otherwise you can get one from its parent resource using the GetPortalConfigContract method. + /// + public partial class PortalConfigContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _portalConfigContractPortalConfigClientDiagnostics; + private readonly PortalConfigRestOperations _portalConfigContractPortalConfigRestClient; + private readonly PortalConfigContractData _data; + + /// Initializes a new instance of the class for mocking. + protected PortalConfigContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal PortalConfigContractResource(ArmClient client, PortalConfigContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal PortalConfigContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _portalConfigContractPortalConfigClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string portalConfigContractPortalConfigApiVersion); + _portalConfigContractPortalConfigRestClient = new PortalConfigRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, portalConfigContractPortalConfigApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/portalconfigs"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual PortalConfigContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractResource.Get"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractResource.Get"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Update + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractResource.Update"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, data, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Update + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractResource.Update"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, data, cancellationToken); + return Response.FromValue(new PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_GetEntityTag + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_GetEntityTag + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractCollection.cs new file mode 100644 index 0000000000000..d1bb7f86b046c --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractCollection.cs @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetResolverContracts method from an instance of . + /// + public partial class ResolverContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _resolverContractGraphQLApiResolverClientDiagnostics; + private readonly GraphQLApiResolverRestOperations _resolverContractGraphQLApiResolverRestClient; + + /// Initializes a new instance of the class for mocking. + protected ResolverContractCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ResolverContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _resolverContractGraphQLApiResolverClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResolverContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResolverContractResource.ResourceType, out string resolverContractGraphQLApiResolverApiVersion); + _resolverContractGraphQLApiResolverRestClient = new GraphQLApiResolverRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, resolverContractGraphQLApiResolverApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApiResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApiResource.ResourceType), nameof(id)); + } + + /// + /// Creates a new resolver in the GraphQL API or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string resolverId, ResolverContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(Response.FromValue(new ResolverContractResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a new resolver in the GraphQL API or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string resolverId, ResolverContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, data, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(Response.FromValue(new ResolverContractResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.Get"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.Get"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists a collection of the resolvers for the specified GraphQL API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers + /// + /// + /// Operation Id + /// GraphQLApiResolver_ListByApi + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _resolverContractGraphQLApiResolverRestClient.CreateListByApiRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _resolverContractGraphQLApiResolverRestClient.CreateListByApiNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ResolverContractResource(Client, ResolverContractData.DeserializeResolverContractData(e)), _resolverContractGraphQLApiResolverClientDiagnostics, Pipeline, "ResolverContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists a collection of the resolvers for the specified GraphQL API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers + /// + /// + /// Operation Id + /// GraphQLApiResolver_ListByApi + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _resolverContractGraphQLApiResolverRestClient.CreateListByApiRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _resolverContractGraphQLApiResolverRestClient.CreateListByApiNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ResolverContractResource(Client, ResolverContractData.DeserializeResolverContractData(e)), _resolverContractGraphQLApiResolverClientDiagnostics, Pipeline, "ResolverContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.Exists"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.Exists"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractData.cs new file mode 100644 index 0000000000000..9d3fa2c9ae3af --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractData.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the ResolverContract data model. + /// GraphQL API Resolver details. + /// + public partial class ResolverContractData : ResourceData + { + /// Initializes a new instance of ResolverContractData. + public ResolverContractData() + { + } + + /// Initializes a new instance of ResolverContractData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Resolver Name. + /// Path is type/field being resolved. + /// Description of the resolver. May include HTML formatting tags. + internal ResolverContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, string path, string description) : base(id, name, resourceType, systemData) + { + DisplayName = displayName; + Path = path; + Description = description; + } + + /// Resolver Name. + public string DisplayName { get; set; } + /// Path is type/field being resolved. + public string Path { get; set; } + /// Description of the resolver. May include HTML formatting tags. + public string Description { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.cs new file mode 100644 index 0000000000000..989fedfc51099 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.cs @@ -0,0 +1,405 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a ResolverContract along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetResolverContractResource method. + /// Otherwise you can get one from its parent resource using the GetResolverContract method. + /// + public partial class ResolverContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _resolverContractGraphQLApiResolverClientDiagnostics; + private readonly GraphQLApiResolverRestOperations _resolverContractGraphQLApiResolverRestClient; + private readonly ResolverContractData _data; + + /// Initializes a new instance of the class for mocking. + protected ResolverContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ResolverContractResource(ArmClient client, ResolverContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ResolverContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _resolverContractGraphQLApiResolverClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string resolverContractGraphQLApiResolverApiVersion); + _resolverContractGraphQLApiResolverRestClient = new GraphQLApiResolverRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, resolverContractGraphQLApiResolverApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/apis/resolvers"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ResolverContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of ServiceApiResolverPolicyResources in the ResolverContract. + /// An object representing collection of ServiceApiResolverPolicyResources and their operations over a ServiceApiResolverPolicyResource. + public virtual ServiceApiResolverPolicyCollection GetServiceApiResolverPolicies() + { + return GetCachedClient(Client => new ServiceApiResolverPolicyCollection(Client, Id)); + } + + /// + /// Get the policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual async Task> GetServiceApiResolverPolicyAsync(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + return await GetServiceApiResolverPolicies().GetAsync(policyId, format, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual Response GetServiceApiResolverPolicy(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + return GetServiceApiResolverPolicies().Get(policyId, format, cancellationToken); + } + + /// + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.Get"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.Get"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified resolver in the GraphQL API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.Delete"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified resolver in the GraphQL API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.Delete"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the resolver in the GraphQL API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Update + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// GraphQL API Resolver Update parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, ResolverContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.Update"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the resolver in the GraphQL API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Update + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// GraphQL API Resolver Update parameters. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, ResolverContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.Update"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, patch, cancellationToken); + return Response.FromValue(new ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_GetEntityTag + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_GetEntityTag + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiDiagnosticRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiDiagnosticRestOperations.cs index db864985bfcc9..27990688e9389 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiDiagnosticRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiDiagnosticRestOperations.cs @@ -33,7 +33,7 @@ public ApiDiagnosticRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all diagnostics of an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -107,8 +107,8 @@ public async Task> ListByServiceAsync(string subs } /// Lists all diagnostics of an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -165,8 +165,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -201,8 +201,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -261,8 +261,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Diagnostic for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -296,8 +296,8 @@ public async Task> GetAsync(string subscription } /// Gets the details of the Diagnostic for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -363,8 +363,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Diagnostic for an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -400,8 +400,8 @@ public async Task> CreateOrUpdateAsync(string s } /// Creates a new Diagnostic for an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -466,8 +466,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the Diagnostic for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -502,8 +502,8 @@ public async Task> UpdateAsync(string subscript } /// Updates the details of the Diagnostic for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -563,8 +563,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified Diagnostic from an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -593,8 +593,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified Diagnostic from an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -638,8 +638,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all diagnostics of an API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -674,8 +674,8 @@ public async Task> ListByServiceNextPageAsync(str /// Lists all diagnostics of an API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueAttachmentRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueAttachmentRestOperations.cs index 64f94382dd4ef..f260a3cd900af 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueAttachmentRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueAttachmentRestOperations.cs @@ -33,7 +33,7 @@ public ApiIssueAttachmentRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,8 +75,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all attachments for the Issue associated with the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -111,8 +111,8 @@ public async Task> ListByServiceAsync(string } /// Lists all attachments for the Issue associated with the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -173,8 +173,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -211,8 +211,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -275,8 +275,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the issue Attachment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -312,8 +312,8 @@ public async Task> GetAsync(string subscription } /// Gets the details of the issue Attachment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -383,8 +383,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Attachment for the Issue in an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -422,8 +422,8 @@ public async Task> CreateOrUpdateAsync(string s } /// Creates a new Attachment for the Issue in an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -488,8 +488,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified comment from an Issue. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -520,8 +520,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified comment from an Issue. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -567,8 +567,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all attachments for the Issue associated with the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -605,8 +605,8 @@ public async Task> ListByServiceNextPageAsyn /// Lists all attachments for the Issue associated with the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueCommentRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueCommentRestOperations.cs index f03fe5ed7a036..ecf32c9c94808 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueCommentRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueCommentRestOperations.cs @@ -33,7 +33,7 @@ public ApiIssueCommentRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,8 +75,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all comments for the Issue associated with the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -111,8 +111,8 @@ public async Task> ListByServiceAsync(string su } /// Lists all comments for the Issue associated with the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -173,8 +173,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -211,8 +211,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -275,8 +275,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the issue Comment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -312,8 +312,8 @@ public async Task> GetAsync(string subscriptionId, } /// Gets the details of the issue Comment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -383,8 +383,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Comment for the Issue in an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -422,8 +422,8 @@ public async Task> CreateOrUpdateAsync(string subs } /// Creates a new Comment for the Issue in an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -488,8 +488,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified comment from an Issue. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -520,8 +520,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified comment from an Issue. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -567,8 +567,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all comments for the Issue associated with the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -605,8 +605,8 @@ public async Task> ListByServiceNextPageAsync(s /// Lists all comments for the Issue associated with the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueRestOperations.cs index f6ead96eb010e..acc7ca7e2fb41 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueRestOperations.cs @@ -33,7 +33,7 @@ public ApiIssueRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -77,8 +77,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all issues associated with the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. @@ -112,8 +112,8 @@ public async Task> ListByServiceAsync(string subscript } /// Lists all issues associated with the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. @@ -171,8 +171,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -207,8 +207,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -271,8 +271,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Issue for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -307,8 +307,8 @@ public async Task> GetAsync(string subscriptionId, s } /// Gets the details of the Issue for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -375,8 +375,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Issue for an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -412,8 +412,8 @@ public async Task> CreateOrUpdateAsync(string subscr } /// Creates a new Issue for an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -478,8 +478,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an existing issue for an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -514,8 +514,8 @@ public async Task> UpdateAsync(string subscriptionId } /// Updates an existing issue for an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -575,8 +575,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified Issue from an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -605,8 +605,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified Issue from an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -650,8 +650,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all issues associated with the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. @@ -687,8 +687,8 @@ public async Task> ListByServiceNextPageAsync(string n /// Lists all issues associated with the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementRestOperations.cs index 2a96fc8ab6a76..7df18b4b19896 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementRestOperations.cs @@ -32,7 +32,7 @@ public ApiManagementRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -62,8 +62,8 @@ internal HttpMessage CreatePerformConnectivityCheckAsyncRequest(string subscript } /// Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Connectivity Check request parameters. /// The cancellation token to use. @@ -89,8 +89,8 @@ public async Task PerformConnectivityCheckAsyncAsync(string subscripti } /// Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Connectivity Check request parameters. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceRestOperations.cs index c54b5fe7924dd..47e96817d9b3e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceRestOperations.cs @@ -33,7 +33,7 @@ public ApiManagementServiceRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -63,8 +63,8 @@ internal HttpMessage CreateRestoreRequest(string subscriptionId, string resource } /// Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the Restore API Management service from backup operation. /// The cancellation token to use. @@ -90,8 +90,8 @@ public async Task RestoreAsync(string subscriptionId, string resourceG } /// Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the Restore API Management service from backup operation. /// The cancellation token to use. @@ -142,8 +142,8 @@ internal HttpMessage CreateBackupRequest(string subscriptionId, string resourceG } /// Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the ApiManagementService_Backup operation. /// The cancellation token to use. @@ -169,8 +169,8 @@ public async Task BackupAsync(string subscriptionId, string resourceGr } /// Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the ApiManagementService_Backup operation. /// The cancellation token to use. @@ -220,8 +220,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the CreateOrUpdate API Management service operation. /// The cancellation token to use. @@ -240,7 +240,6 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -248,8 +247,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the CreateOrUpdate API Management service operation. /// The cancellation token to use. @@ -268,7 +267,6 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -300,8 +298,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an existing API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the CreateOrUpdate API Management service operation. /// The cancellation token to use. @@ -327,8 +325,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Updates an existing API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the CreateOrUpdate API Management service operation. /// The cancellation token to use. @@ -374,8 +372,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets an API Management service resource description. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -405,8 +403,8 @@ public async Task> GetAsync(string subscripti } /// Gets an API Management service resource description. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -456,8 +454,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes an existing API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -482,8 +480,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes an existing API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -507,6 +505,77 @@ public Response Delete(string subscriptionId, string resourceGroupName, string s } } + internal HttpMessage CreateMigrateToStv2Request(string subscriptionId, string resourceGroupName, string serviceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/migrateToStv2", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task MigrateToStv2Async(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateMigrateToStv2Request(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response MigrateToStv2(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateMigrateToStv2Request(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); @@ -527,8 +596,8 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// List all API Management services within a resource group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -554,8 +623,8 @@ public async Task> ListByResourceGroupA } /// List all API Management services within a resource group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -598,7 +667,7 @@ internal HttpMessage CreateListRequest(string subscriptionId) } /// Lists all API Management services within an Azure subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -623,7 +692,7 @@ public async Task> ListAsync(string sub } /// Lists all API Management services within an Azure subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -669,8 +738,8 @@ internal HttpMessage CreateGetSsoTokenRequest(string subscriptionId, string reso } /// Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -698,8 +767,8 @@ public async Task> GetSsoTokenAs } /// Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -748,7 +817,7 @@ internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, A } /// Checks availability and correctness of a name for an API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// Parameters supplied to the CheckNameAvailability operation. /// The cancellation token to use. /// or is null. @@ -775,7 +844,7 @@ public async Task> CheckNam } /// Checks availability and correctness of a name for an API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// Parameters supplied to the CheckNameAvailability operation. /// The cancellation token to use. /// or is null. @@ -819,7 +888,7 @@ internal HttpMessage CreateGetDomainOwnershipIdentifierRequest(string subscripti } /// Get the custom domain ownership identifier for an API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -844,7 +913,7 @@ public async Task Get the custom domain ownership identifier for an API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -897,8 +966,8 @@ internal HttpMessage CreateApplyNetworkConfigurationUpdatesRequest(string subscr } /// Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which the Api Management service is deployed will be updated sequentially without incurring downtime in the region. /// The cancellation token to use. @@ -923,8 +992,8 @@ public async Task ApplyNetworkConfigurationUpdatesAsync(string subscri } /// Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which the Api Management service is deployed will be updated sequentially without incurring downtime in the region. /// The cancellation token to use. @@ -964,8 +1033,8 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// List all API Management services within a resource group. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. @@ -993,8 +1062,8 @@ public async Task> ListByResourceGroupN /// List all API Management services within a resource group. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. @@ -1036,7 +1105,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists all API Management services within an Azure subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -1063,7 +1132,7 @@ public async Task> ListNextPageAsync(st /// Lists all API Management services within an Azure subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceSkusRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceSkusRestOperations.cs index d2814c6dcfebf..acdc6683a3f6d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceSkusRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceSkusRestOperations.cs @@ -33,7 +33,7 @@ public ApiManagementServiceSkusRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -59,8 +59,8 @@ internal HttpMessage CreateListAvailableServiceSkusRequest(string subscriptionId } /// Gets all available SKU for a given API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -88,8 +88,8 @@ public async Task> ListAvailableServiceSkusAsync(st } /// Gets all available SKU for a given API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -132,8 +132,8 @@ internal HttpMessage CreateListAvailableServiceSkusNextPageRequest(string nextLi /// Gets all available SKU for a given API Management service. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. @@ -163,8 +163,8 @@ public async Task> ListAvailableServiceSkusNextPage /// Gets all available SKU for a given API Management service. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementSkusRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementSkusRestOperations.cs index 3873ec1e789e4..b74b53a19db2a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementSkusRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementSkusRestOperations.cs @@ -33,7 +33,7 @@ public ApiManagementSkusRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -55,7 +55,7 @@ internal HttpMessage CreateListRequest(string subscriptionId) } /// Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -80,7 +80,7 @@ public async Task> ListAsync(string subscripti } /// Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -120,7 +120,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -147,7 +147,7 @@ public async Task> ListNextPageAsync(string ne /// Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationPolicyRestOperations.cs index b536472bf8186..f724daba329ea 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationPolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationPolicyRestOperations.cs @@ -33,7 +33,7 @@ public ApiOperationPolicyRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -63,8 +63,8 @@ internal HttpMessage CreateListByOperationRequest(string subscriptionId, string } /// Get the list of policy configuration at the API Operation level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -96,8 +96,8 @@ public async Task> ListByOperationAsync(string subscr } /// Get the list of policy configuration at the API Operation level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -155,8 +155,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the API operation policy specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -192,8 +192,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the API operation policy specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -259,8 +259,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the policy configuration at the API Operation level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -296,8 +296,8 @@ public async Task> GetAsync(string subscriptionId, } /// Get the policy configuration at the API Operation level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -367,8 +367,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates policy configuration for the API Operation level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -405,8 +405,8 @@ public async Task> CreateOrUpdateAsync(string subsc } /// Creates or updates policy configuration for the API Operation level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -470,8 +470,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the policy configuration at the Api Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -501,8 +501,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the policy configuration at the Api Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationRestOperations.cs index c4d7dea2c4ec3..c8fd4b43a29d1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationRestOperations.cs @@ -33,7 +33,7 @@ public ApiOperationRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -77,8 +77,8 @@ internal HttpMessage CreateListByApiRequest(string subscriptionId, string resour } /// Lists a collection of the operations for the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -112,8 +112,8 @@ public async Task> ListByApiAsync(string subscript } /// Lists a collection of the operations for the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -171,8 +171,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the API operation specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -207,8 +207,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the API operation specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -267,8 +267,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the API Operation specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -302,8 +302,8 @@ public async Task> GetAsync(string subscriptionId, st } /// Gets the details of the API Operation specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -369,8 +369,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new operation in the API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -406,8 +406,8 @@ public async Task> CreateOrUpdateAsync(string subscri } /// Creates a new operation in the API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -472,8 +472,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the operation in the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -508,8 +508,8 @@ public async Task> UpdateAsync(string subscriptionId, } /// Updates the details of the operation in the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -569,8 +569,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified operation in the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -599,8 +599,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified operation in the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -644,8 +644,8 @@ internal HttpMessage CreateListByApiNextPageRequest(string nextLink, string subs /// Lists a collection of the operations for the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -681,8 +681,8 @@ public async Task> ListByApiNextPageAsync(string n /// Lists a collection of the operations for the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiPolicyRestOperations.cs index 586fcd8f031d5..7bc4f17c6254f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiPolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiPolicyRestOperations.cs @@ -33,7 +33,7 @@ public ApiPolicyRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -61,8 +61,8 @@ internal HttpMessage CreateListByApiRequest(string subscriptionId, string resour } /// Get the policy configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The cancellation token to use. @@ -92,8 +92,8 @@ public async Task> ListByApiAsync(string subscription } /// Get the policy configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The cancellation token to use. @@ -147,8 +147,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the API policy specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -182,8 +182,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the API policy specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -245,8 +245,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the policy configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -280,8 +280,8 @@ public async Task> GetAsync(string subscriptionId, } /// Get the policy configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -347,8 +347,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates policy configuration for the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -383,8 +383,8 @@ public async Task> CreateOrUpdateAsync(string subsc } /// Creates or updates policy configuration for the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -444,8 +444,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the policy configuration at the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -473,8 +473,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the policy configuration at the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiProductRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiProductRestOperations.cs index 9d86647df7d0d..06948f90212b6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiProductRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiProductRestOperations.cs @@ -33,7 +33,7 @@ public ApiProductRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByApisRequest(string subscriptionId, string resou } /// Lists all Products, which the API is part of. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -107,8 +107,8 @@ public async Task> ListByApisAsync(string subscripti } /// Lists all Products, which the API is part of. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -156,8 +156,8 @@ internal HttpMessage CreateListByApisNextPageRequest(string nextLink, string sub /// Lists all Products, which the API is part of. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -192,8 +192,8 @@ public async Task> ListByApisNextPageAsync(string ne /// Lists all Products, which the API is part of. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiReleaseRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiReleaseRestOperations.cs index 744d7fe91a3b4..00541d8a9c98a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiReleaseRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiReleaseRestOperations.cs @@ -33,7 +33,7 @@ public ApiReleaseRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -107,8 +107,8 @@ public async Task> ListByServiceAsync(string subs } /// Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -165,8 +165,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Returns the etag of an API release. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -201,8 +201,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Returns the etag of an API release. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -261,8 +261,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Returns the details of an API release. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -296,8 +296,8 @@ public async Task> GetAsync(string subscriptionId, stri } /// Returns the details of an API release. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -363,8 +363,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Release for the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -400,8 +400,8 @@ public async Task> CreateOrUpdateAsync(string subscript } /// Creates a new Release for the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -466,8 +466,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the release of the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -502,8 +502,8 @@ public async Task> UpdateAsync(string subscriptionId, s } /// Updates the details of the release of the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -563,8 +563,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified release in the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -593,8 +593,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified release in the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -638,8 +638,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -674,8 +674,8 @@ public async Task> ListByServiceNextPageAsync(str /// Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRestOperations.cs index 3acb6eb34be03..a855c4b7913a5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRestOperations.cs @@ -33,7 +33,7 @@ public ApiRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoi { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -79,8 +79,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all APIs of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq, ne | |</br>. /// Number of records to return. @@ -113,8 +113,8 @@ public async Task> ListByServiceAsync(string subscriptio } /// Lists all APIs of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq, ne | |</br>. /// Number of records to return. @@ -169,8 +169,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The cancellation token to use. @@ -203,8 +203,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The cancellation token to use. @@ -259,8 +259,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The cancellation token to use. @@ -292,8 +292,8 @@ public async Task> GetAsync(string subscriptionId, string reso } /// Gets the details of the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The cancellation token to use. @@ -355,8 +355,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates new or updates existing specified API of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Create or update parameters. @@ -386,8 +386,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates new or updates existing specified API of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Create or update parameters. @@ -444,8 +444,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the specified API of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -478,8 +478,8 @@ public async Task> UpdateAsync(string subscriptionId, string r } /// Updates the specified API of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -539,8 +539,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified API of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -568,8 +568,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified API of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -634,8 +634,8 @@ internal HttpMessage CreateListByTagsRequest(string subscriptionId, string resou } /// Lists a collection of apis associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. @@ -667,8 +667,8 @@ public async Task> ListByTagsAsync(string subscr } /// Lists a collection of apis associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. @@ -715,8 +715,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all APIs of the API Management service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq, ne | |</br>. /// Number of records to return. @@ -751,8 +751,8 @@ public async Task> ListByServiceNextPageAsync(string nex /// Lists all APIs of the API Management service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq, ne | |</br>. /// Number of records to return. @@ -801,8 +801,8 @@ internal HttpMessage CreateListByTagsNextPageRequest(string nextLink, string sub /// Lists a collection of apis associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. @@ -836,8 +836,8 @@ public async Task> ListByTagsNextPageAsync(strin /// Lists a collection of apis associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRevisionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRevisionRestOperations.cs index f7273137f849c..6da8fe2c9571b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRevisionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRevisionRestOperations.cs @@ -33,7 +33,7 @@ public ApiRevisionRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all revisions of an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -107,8 +107,8 @@ public async Task> ListByServiceAsync(string sub } /// Lists all revisions of an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -156,8 +156,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all revisions of an API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -192,8 +192,8 @@ public async Task> ListByServiceNextPageAsync(st /// Lists all revisions of an API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiSchemaRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiSchemaRestOperations.cs index 6146360a20078..cde36562c9059 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiSchemaRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiSchemaRestOperations.cs @@ -33,7 +33,7 @@ public ApiSchemaRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByApiRequest(string subscriptionId, string resour } /// Get the schema configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -107,8 +107,8 @@ public async Task> ListByApiAsync(string subscription } /// Get the schema configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -165,8 +165,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the schema specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -201,8 +201,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the schema specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -261,8 +261,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the schema configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -296,8 +296,8 @@ public async Task> GetAsync(string subscriptionId, strin } /// Get the schema configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -363,8 +363,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates schema configuration for the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -396,8 +396,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates schema configuration for the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -458,8 +458,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the schema configuration at the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -489,8 +489,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the schema configuration at the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -535,8 +535,8 @@ internal HttpMessage CreateListByApiNextPageRequest(string nextLink, string subs /// Get the schema configuration at the API level. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -571,8 +571,8 @@ public async Task> ListByApiNextPageAsync(string next /// Get the schema configuration at the API level. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiTagDescriptionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiTagDescriptionRestOperations.cs index 204b74a128684..52fce1364d0e1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiTagDescriptionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiTagDescriptionRestOperations.cs @@ -33,7 +33,7 @@ public ApiTagDescriptionRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -107,8 +107,8 @@ public async Task> ListByServiceAsync(string } /// Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -165,8 +165,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -201,8 +201,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -261,8 +261,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get Tag description in scope of API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -296,8 +296,8 @@ public async Task> GetAsync(string subscriptionI } /// Get Tag description in scope of API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -363,8 +363,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create/Update tag description in scope of the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -400,8 +400,8 @@ public async Task> CreateOrUpdateAsync(string su } /// Create/Update tag description in scope of the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -462,8 +462,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete tag description for the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -492,8 +492,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete tag description for the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -537,8 +537,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -573,8 +573,8 @@ public async Task> ListByServiceNextPageAsync /// Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiVersionSetRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiVersionSetRestOperations.cs index e78081ceb08e9..df5bd005f890d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiVersionSetRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiVersionSetRestOperations.cs @@ -33,7 +33,7 @@ public ApiVersionSetRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,8 +71,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of API Version Sets in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>. /// Number of records to return. @@ -103,8 +103,8 @@ public async Task> ListByServiceAsync(string s } /// Lists a collection of API Version Sets in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>. /// Number of records to return. @@ -157,8 +157,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -191,8 +191,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -247,8 +247,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Api Version Set specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -280,8 +280,8 @@ public async Task> GetAsync(string subscriptionId, s } /// Gets the details of the Api Version Set specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -343,8 +343,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates a Api Version Set. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -378,8 +378,8 @@ public async Task> CreateOrUpdateAsync(string subscr } /// Creates or Updates a Api Version Set. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -440,8 +440,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the Api VersionSet specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -474,8 +474,8 @@ public async Task> UpdateAsync(string subscriptionId } /// Updates the details of the Api VersionSet specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -531,8 +531,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific Api Version Set. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -559,8 +559,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific Api Version Set. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -602,8 +602,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of API Version Sets in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>. /// Number of records to return. @@ -636,8 +636,8 @@ public async Task> ListByServiceNextPageAsync( /// Lists a collection of API Version Sets in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiWikiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiWikiRestOperations.cs new file mode 100644 index 0000000000000..d0cb0fb8c1f89 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiWikiRestOperations.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class ApiWikiRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ApiWikiRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ApiWikiRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, apiId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string apiId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, apiId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the Wiki for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WikiContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the Wiki for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string apiId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WikiContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, WikiContractData data, ETag? ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates a new Wiki for an API or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + WikiContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a new Wiki for an API or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string apiId, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + WikiContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch, WikiUpdateContract wikiUpdateContract) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(wikiUpdateContract); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the details of the Wiki for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, ifMatch, wikiUpdateContract); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the details of the Wiki for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, ifMatch, wikiUpdateContract); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the specified Wiki from an API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the specified Wiki from an API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationAccessPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationAccessPolicyRestOperations.cs new file mode 100644 index 0000000000000..3decda504ea6e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationAccessPolicyRestOperations.cs @@ -0,0 +1,542 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class AuthorizationAccessPolicyRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AuthorizationAccessPolicyRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public AuthorizationAccessPolicyRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListByAuthorizationRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of authorization access policy defined within a authorization. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByAuthorizationAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateListByAuthorizationRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationAccessPolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationAccessPolicyListResult.DeserializeAuthorizationAccessPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of authorization access policy defined within a authorization. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByAuthorization(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateListByAuthorizationRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationAccessPolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationAccessPolicyListResult.DeserializeAuthorizationAccessPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies/", false); + uri.AppendPath(authorizationAccessPolicyId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the authorization access policy specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationAccessPolicyContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AuthorizationAccessPolicyContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the authorization access policy specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationAccessPolicyContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AuthorizationAccessPolicyContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, AuthorizationAccessPolicyContractData data, ETag? ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies/", false); + uri.AppendPath(authorizationAccessPolicyId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates Authorization Access Policy. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Identifier of the authorization access policy. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, AuthorizationAccessPolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + AuthorizationAccessPolicyContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates Authorization Access Policy. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Identifier of the authorization access policy. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, AuthorizationAccessPolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + AuthorizationAccessPolicyContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, ETag ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies/", false); + uri.AppendPath(authorizationAccessPolicyId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes specific access policy from the Authorization. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Identifier of the authorization access policy. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes specific access policy from the Authorization. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Identifier of the authorization access policy. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByAuthorizationNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of authorization access policy defined within a authorization. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByAuthorizationNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateListByAuthorizationNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationAccessPolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationAccessPolicyListResult.DeserializeAuthorizationAccessPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of authorization access policy defined within a authorization. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByAuthorizationNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateListByAuthorizationNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationAccessPolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationAccessPolicyListResult.DeserializeAuthorizationAccessPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationLoginLinksRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationLoginLinksRestOperations.cs new file mode 100644 index 0000000000000..b382af03d8947 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationLoginLinksRestOperations.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class AuthorizationLoginLinksRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AuthorizationLoginLinksRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public AuthorizationLoginLinksRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreatePostRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationLoginRequestContract authorizationLoginRequestContract) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/getLoginLinks", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(authorizationLoginRequestContract); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Gets authorization login links. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> PostAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationLoginRequestContract authorizationLoginRequestContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(authorizationLoginRequestContract, nameof(authorizationLoginRequestContract)); + + using var message = CreatePostRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationLoginRequestContract); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationLoginResponseContract value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationLoginResponseContract.DeserializeAuthorizationLoginResponseContract(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets authorization login links. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Post(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationLoginRequestContract authorizationLoginRequestContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(authorizationLoginRequestContract, nameof(authorizationLoginRequestContract)); + + using var message = CreatePostRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationLoginRequestContract); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationLoginResponseContract value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationLoginResponseContract.DeserializeAuthorizationLoginResponseContract(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationProviderRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationProviderRestOperations.cs new file mode 100644 index 0000000000000..8d379d59224a1 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationProviderRestOperations.cs @@ -0,0 +1,486 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class AuthorizationProviderRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AuthorizationProviderRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public AuthorizationProviderRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListByServiceRequest(string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of authorization providers defined within a service instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceAsync(string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationProviderListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationProviderListResult.DeserializeAuthorizationProviderListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of authorization providers defined within a service instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByService(string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationProviderListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationProviderListResult.DeserializeAuthorizationProviderListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the authorization provider specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationProviderContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AuthorizationProviderContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the authorization provider specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationProviderContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AuthorizationProviderContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, AuthorizationProviderContractData data, ETag? ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates authorization provider. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, AuthorizationProviderContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + AuthorizationProviderContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates authorization provider. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, AuthorizationProviderContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + AuthorizationProviderContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, ETag ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes specific authorization provider from the API Management service instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes specific authorization provider from the API Management service instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of authorization providers defined within a service instance. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationProviderListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationProviderListResult.DeserializeAuthorizationProviderListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of authorization providers defined within a service instance. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServiceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationProviderListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationProviderListResult.DeserializeAuthorizationProviderListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationRestOperations.cs new file mode 100644 index 0000000000000..6c46f59ace76d --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationRestOperations.cs @@ -0,0 +1,603 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class AuthorizationRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AuthorizationRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public AuthorizationRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListByAuthorizationProviderRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of authorization providers defined within a authorization provider. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByAuthorizationProviderAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateListByAuthorizationProviderRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationListResult.DeserializeAuthorizationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of authorization providers defined within a authorization provider. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByAuthorizationProvider(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateListByAuthorizationProviderRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationListResult.DeserializeAuthorizationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the authorization specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationContractData.DeserializeAuthorizationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AuthorizationContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the authorization specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationContractData.DeserializeAuthorizationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AuthorizationContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationContractData data, ETag? ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates authorization. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + AuthorizationContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationContractData.DeserializeAuthorizationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates authorization. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + AuthorizationContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationContractData.DeserializeAuthorizationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, ETag ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes specific Authorization from the Authorization provider. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes specific Authorization from the Authorization provider. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateConfirmConsentCodeRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationConfirmConsentCodeRequestContract authorizationConfirmConsentCodeRequestContract) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/confirmConsentCode", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(authorizationConfirmConsentCodeRequestContract); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Confirm valid consent code to suppress Authorizations anti-phishing page. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task ConfirmConsentCodeAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationConfirmConsentCodeRequestContract authorizationConfirmConsentCodeRequestContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(authorizationConfirmConsentCodeRequestContract, nameof(authorizationConfirmConsentCodeRequestContract)); + + using var message = CreateConfirmConsentCodeRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationConfirmConsentCodeRequestContract); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Confirm valid consent code to suppress Authorizations anti-phishing page. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ConfirmConsentCode(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationConfirmConsentCodeRequestContract authorizationConfirmConsentCodeRequestContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(authorizationConfirmConsentCodeRequestContract, nameof(authorizationConfirmConsentCodeRequestContract)); + + using var message = CreateConfirmConsentCodeRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationConfirmConsentCodeRequestContract); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByAuthorizationProviderNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of authorization providers defined within a authorization provider. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByAuthorizationProviderNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateListByAuthorizationProviderNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, authorizationProviderId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationListResult.DeserializeAuthorizationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of authorization providers defined within a authorization provider. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByAuthorizationProviderNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateListByAuthorizationProviderNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, authorizationProviderId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationListResult.DeserializeAuthorizationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationServerRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationServerRestOperations.cs index f4beb4291e8c0..4d9cd2af64be6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationServerRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationServerRestOperations.cs @@ -33,7 +33,7 @@ public AuthorizationServerRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,8 +71,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of authorization servers defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -103,8 +103,8 @@ public async Task> ListByServiceAsync(st } /// Lists a collection of authorization servers defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -157,8 +157,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// The cancellation token to use. @@ -191,8 +191,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// The cancellation token to use. @@ -247,8 +247,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the authorization server specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// The cancellation token to use. @@ -280,8 +280,8 @@ public async Task> GetAsync(strin } /// Gets the details of the authorization server specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// The cancellation token to use. @@ -343,8 +343,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates new authorization server or updates an existing authorization server. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// Create or update parameters. @@ -378,8 +378,8 @@ public async Task> CreateOrUpdate } /// Creates new authorization server or updates an existing authorization server. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// Create or update parameters. @@ -440,8 +440,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the authorization server specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -474,8 +474,8 @@ public async Task> UpdateAsync(st } /// Updates the details of the authorization server specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -531,8 +531,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific authorization server instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -559,8 +559,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific authorization server instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -610,8 +610,8 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// Gets the client secret details of the authorization server. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// The cancellation token to use. @@ -641,8 +641,8 @@ public async Task> ListSecretsAsync } /// Gets the client secret details of the authorization server. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// The cancellation token to use. @@ -687,8 +687,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of authorization servers defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -721,8 +721,8 @@ public async Task> ListByServiceNextPage /// Lists a collection of authorization servers defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/BackendRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/BackendRestOperations.cs index d237bf27a89d4..f37203afa24ea 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/BackendRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/BackendRestOperations.cs @@ -33,7 +33,7 @@ public BackendRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,8 +71,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of backends in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -103,8 +103,8 @@ public async Task> ListByServiceAsync(string subscri } /// Lists a collection of backends in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -157,8 +157,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the backend specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -191,8 +191,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the backend specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -247,8 +247,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the backend specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -280,8 +280,8 @@ public async Task> GetAsync(string subscripti } /// Gets the details of the backend specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -343,8 +343,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates a backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// Create parameters. @@ -378,8 +378,8 @@ public async Task> CreateOrUpdateAsync(string } /// Creates or Updates a backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// Create parameters. @@ -440,8 +440,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an existing backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -474,8 +474,8 @@ public async Task> UpdateAsync(string subscri } /// Updates an existing backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -531,8 +531,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -559,8 +559,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -616,9 +616,9 @@ internal HttpMessage CreateReconnectRequest(string subscriptionId, string resour return message; } - /// Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// Reconnect request parameters. @@ -643,9 +643,9 @@ public async Task ReconnectAsync(string subscriptionId, string resourc } } - /// Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// Reconnect request parameters. @@ -686,8 +686,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of backends in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -720,8 +720,8 @@ public async Task> ListByServiceNextPageAsync(string /// Lists a collection of backends in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CacheRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CacheRestOperations.cs index 4b9168355c5ac..c459121f71598 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CacheRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CacheRestOperations.cs @@ -33,7 +33,7 @@ public CacheRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -67,8 +67,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of all external Caches in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. @@ -98,8 +98,8 @@ public async Task> ListByServiceAsync(string subscript } /// Lists a collection of all external Caches in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. @@ -151,8 +151,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Cache specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// The cancellation token to use. @@ -185,8 +185,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Cache specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// The cancellation token to use. @@ -241,8 +241,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Cache specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// The cancellation token to use. @@ -274,8 +274,8 @@ public async Task> GetAsync(string subscription } /// Gets the details of the Cache specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// The cancellation token to use. @@ -337,8 +337,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates an External Cache to be used in Api Management instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// Create or Update parameters. @@ -372,8 +372,8 @@ public async Task> CreateOrUpdateAsync(string s } /// Creates or updates an External Cache to be used in Api Management instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// Create or Update parameters. @@ -434,8 +434,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the cache specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -468,8 +468,8 @@ public async Task> UpdateAsync(string subscript } /// Updates the details of the cache specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -525,8 +525,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific Cache. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -553,8 +553,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific Cache. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -596,8 +596,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of all external Caches in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. @@ -629,8 +629,8 @@ public async Task> ListByServiceNextPageAsync(string n /// Lists a collection of all external Caches in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CertificateRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CertificateRestOperations.cs index 53723e58eb024..0559f468a8d75 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CertificateRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CertificateRestOperations.cs @@ -33,7 +33,7 @@ public CertificateRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,8 +75,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of all certificates in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| expirationDate | filter | ge, le, eq, ne, gt, lt | |</br>. /// Number of records to return. @@ -108,8 +108,8 @@ public async Task> ListByServiceAsync(string sub } /// Lists a collection of all certificates in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| expirationDate | filter | ge, le, eq, ne, gt, lt | |</br>. /// Number of records to return. @@ -163,8 +163,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the certificate specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -197,8 +197,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the certificate specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -253,8 +253,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the certificate specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -286,8 +286,8 @@ public async Task> GetAsync(string subscr } /// Gets the details of the certificate specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -349,8 +349,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates the certificate being used for authentication with the backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// Create or Update parameters. @@ -384,8 +384,8 @@ public async Task> CreateOrUpdateAsync(st } /// Creates or updates the certificate being used for authentication with the backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// Create or Update parameters. @@ -442,8 +442,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific certificate. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -470,8 +470,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific certificate. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -521,8 +521,8 @@ internal HttpMessage CreateRefreshSecretRequest(string subscriptionId, string re } /// From KeyVault, Refresh the certificate being used for authentication with the backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -552,8 +552,8 @@ public async Task> RefreshSecretAsync(str } /// From KeyVault, Refresh the certificate being used for authentication with the backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -598,8 +598,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of all certificates in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| expirationDate | filter | ge, le, eq, ne, gt, lt | |</br>. /// Number of records to return. @@ -633,8 +633,8 @@ public async Task> ListByServiceNextPageAsync(st /// Lists a collection of all certificates in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| expirationDate | filter | ge, le, eq, ne, gt, lt | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentItemRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentItemRestOperations.cs index 392b96b5ff359..5f5d84781525f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentItemRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentItemRestOperations.cs @@ -33,7 +33,7 @@ public ContentItemRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -61,8 +61,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists developer portal's content items specified by the provided content type. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// The cancellation token to use. @@ -92,8 +92,8 @@ public async Task> ListByServiceAsync(string sub } /// Lists developer portal's content items specified by the provided content type. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// The cancellation token to use. @@ -147,8 +147,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -183,8 +183,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -243,8 +243,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Returns the developer portal's content item specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -276,8 +276,8 @@ public async Task> GetAsync(string subscripti } /// Returns the developer portal's content item specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -308,7 +308,7 @@ public Response Get(string subscriptionId, string reso } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string contentTypeId, string contentItemId, ETag? ifMatch) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string contentTypeId, string contentItemId, ApiManagementContentItem apiManagementContentItem, ETag? ifMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -332,29 +332,35 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r request.Headers.Add("If-Match", ifMatch.Value); } request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(apiManagementContentItem); + request.Content = content; _userAgent.Apply(message); return message; } /// Creates a new developer portal's content item specified by the provided content type. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. + /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. /// The cancellation token to use. - /// , , , or is null. + /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string contentTypeId, string contentItemId, ETag? ifMatch = null, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string contentTypeId, string contentItemId, ApiManagementContentItem apiManagementContentItem, ETag? ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); Argument.AssertNotNullOrEmpty(contentTypeId, nameof(contentTypeId)); Argument.AssertNotNullOrEmpty(contentItemId, nameof(contentItemId)); + Argument.AssertNotNull(apiManagementContentItem, nameof(apiManagementContentItem)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, contentTypeId, contentItemId, ifMatch); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, contentTypeId, contentItemId, apiManagementContentItem, ifMatch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -372,24 +378,26 @@ public async Task> CreateOrUpdateAsync(string } /// Creates a new developer portal's content item specified by the provided content type. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. + /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. /// The cancellation token to use. - /// , , , or is null. + /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string contentTypeId, string contentItemId, ETag? ifMatch = null, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string contentTypeId, string contentItemId, ApiManagementContentItem apiManagementContentItem, ETag? ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); Argument.AssertNotNullOrEmpty(contentTypeId, nameof(contentTypeId)); Argument.AssertNotNullOrEmpty(contentItemId, nameof(contentItemId)); + Argument.AssertNotNull(apiManagementContentItem, nameof(apiManagementContentItem)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, contentTypeId, contentItemId, ifMatch); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, contentTypeId, contentItemId, apiManagementContentItem, ifMatch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -432,8 +440,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Removes the specified developer portal's content item. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -462,8 +470,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Removes the specified developer portal's content item. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -507,8 +515,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists developer portal's content items specified by the provided content type. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// The cancellation token to use. @@ -540,8 +548,8 @@ public async Task> ListByServiceNextPageAsync(st /// Lists developer portal's content items specified by the provided content type. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentTypeRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentTypeRestOperations.cs index 670bb962e5e90..597b570ab3412 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentTypeRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentTypeRestOperations.cs @@ -33,7 +33,7 @@ public ContentTypeRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -59,8 +59,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -88,8 +88,8 @@ public async Task> ListByServiceAsync(string sub } /// Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -139,8 +139,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// The cancellation token to use. @@ -170,8 +170,8 @@ public async Task> GetAsync(string subscripti } /// Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// The cancellation token to use. @@ -200,7 +200,7 @@ public Response Get(string subscriptionId, string reso } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string contentTypeId, ETag? ifMatch) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string contentTypeId, ApiManagementContentType apiManagementContentType, ETag? ifMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -222,27 +222,33 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r request.Headers.Add("If-Match", ifMatch.Value); } request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(apiManagementContentType); + request.Content = content; _userAgent.Apply(message); return message; } /// Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. + /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string contentTypeId, ETag? ifMatch = null, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string contentTypeId, ApiManagementContentType apiManagementContentType, ETag? ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); Argument.AssertNotNullOrEmpty(contentTypeId, nameof(contentTypeId)); + Argument.AssertNotNull(apiManagementContentType, nameof(apiManagementContentType)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, contentTypeId, ifMatch); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, contentTypeId, apiManagementContentType, ifMatch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -260,22 +266,24 @@ public async Task> CreateOrUpdateAsync(string } /// Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. + /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string contentTypeId, ETag? ifMatch = null, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string contentTypeId, ApiManagementContentType apiManagementContentType, ETag? ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); Argument.AssertNotNullOrEmpty(contentTypeId, nameof(contentTypeId)); + Argument.AssertNotNull(apiManagementContentType, nameof(apiManagementContentType)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, contentTypeId, ifMatch); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, contentTypeId, apiManagementContentType, ifMatch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -316,8 +324,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -344,8 +352,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -387,8 +395,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. @@ -418,8 +426,8 @@ public async Task> ListByServiceNextPageAsync(st /// Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DelegationSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DelegationSettingsRestOperations.cs index 3f057b998be49..6e616f9343faa 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DelegationSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DelegationSettingsRestOperations.cs @@ -33,7 +33,7 @@ public DelegationSettingsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -59,8 +59,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the DelegationSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -91,8 +91,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the DelegationSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -144,8 +144,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get Delegation Settings for the Portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -175,8 +175,8 @@ public async Task> GetAsync(s } /// Get Delegation Settings for the Portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -232,8 +232,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update Delegation settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. /// Update Delegation settings. @@ -259,8 +259,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Update Delegation settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. /// Update Delegation settings. @@ -315,8 +315,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or Update Delegation settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -347,8 +347,8 @@ public async Task> CreateOrUp } /// Create or Update Delegation settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -400,8 +400,8 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// Gets the secret validation key of the DelegationSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -429,8 +429,8 @@ public async Task> ListSecretsAsync } /// Gets the secret validation key of the DelegationSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DeletedServicesRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DeletedServicesRestOperations.cs index 7191bf897c402..aa65a1cda7981 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DeletedServicesRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DeletedServicesRestOperations.cs @@ -33,7 +33,7 @@ public DeletedServicesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -55,7 +55,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Lists all soft-deleted services available for undelete for the given subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -80,7 +80,7 @@ public async Task> ListBySubscriptionAsync(s } /// Lists all soft-deleted services available for undelete for the given subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -125,7 +125,7 @@ internal HttpMessage CreateGetByNameRequest(string subscriptionId, AzureLocation } /// Get soft-deleted Api Management Service by name. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The location of the deleted API Management service. /// The name of the API Management service. /// The cancellation token to use. @@ -155,7 +155,7 @@ public async Task> GetByNameAsync(stri } /// Get soft-deleted Api Management Service by name. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The location of the deleted API Management service. /// The name of the API Management service. /// The cancellation token to use. @@ -205,7 +205,7 @@ internal HttpMessage CreatePurgeRequest(string subscriptionId, AzureLocation loc } /// Purges Api Management Service (deletes it with no option to undelete). - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The location of the deleted API Management service. /// The name of the API Management service. /// The cancellation token to use. @@ -230,7 +230,7 @@ public async Task PurgeAsync(string subscriptionId, AzureLocation loca } /// Purges Api Management Service (deletes it with no option to undelete). - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The location of the deleted API Management service. /// The name of the API Management service. /// The cancellation token to use. @@ -270,7 +270,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Lists all soft-deleted services available for undelete for the given subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -297,7 +297,7 @@ public async Task> ListBySubscriptionNextPag /// Lists all soft-deleted services available for undelete for the given subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DiagnosticRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DiagnosticRestOperations.cs index 89bd396dc6eee..80369983d998f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DiagnosticRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DiagnosticRestOperations.cs @@ -33,7 +33,7 @@ public DiagnosticRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,8 +71,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all diagnostics of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -103,8 +103,8 @@ public async Task> ListByServiceAsync(string subs } /// Lists all diagnostics of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -157,8 +157,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -191,8 +191,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -247,8 +247,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Diagnostic specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -280,8 +280,8 @@ public async Task> GetAsync(string subscription } /// Gets the details of the Diagnostic specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -343,8 +343,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Diagnostic or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// Create parameters. @@ -378,8 +378,8 @@ public async Task> CreateOrUpdateAsync(string s } /// Creates a new Diagnostic or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// Create parameters. @@ -440,8 +440,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the Diagnostic specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -474,8 +474,8 @@ public async Task> UpdateAsync(string subscript } /// Updates the details of the Diagnostic specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -531,8 +531,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified Diagnostic. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -559,8 +559,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified Diagnostic. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -602,8 +602,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all diagnostics of the API Management service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -636,8 +636,8 @@ public async Task> ListByServiceNextPageAsync(str /// Lists all diagnostics of the API Management service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DocumentationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DocumentationRestOperations.cs new file mode 100644 index 0000000000000..7e61bac984587 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DocumentationRestOperations.cs @@ -0,0 +1,671 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class DocumentationRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DocumentationRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public DocumentationRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListByServiceRequest(string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all Documentations of the API Management service instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq | contains |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceAsync(string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DocumentationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DocumentationListResult.DeserializeDocumentationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all Documentations of the API Management service instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq | contains |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByService(string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DocumentationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DocumentationListResult.DeserializeDocumentationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string documentationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the Documentation by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, documentationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the Documentation by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, documentationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string documentationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the Documentation specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, documentationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DocumentationContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DocumentationContractData.DeserializeDocumentationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DocumentationContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the Documentation specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, documentationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DocumentationContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DocumentationContractData.DeserializeDocumentationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DocumentationContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, DocumentationContractData data, ETag? ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates a new Documentation or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, DocumentationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, documentationId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + DocumentationContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DocumentationContractData.DeserializeDocumentationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a new Documentation or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, DocumentationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, documentationId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + DocumentationContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DocumentationContractData.DeserializeDocumentationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch, DocumentationContractPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the details of the Documentation for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Documentation Update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch, DocumentationContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, documentationId, ifMatch, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DocumentationContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DocumentationContractData.DeserializeDocumentationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the details of the Documentation for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Documentation Update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch, DocumentationContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, documentationId, ifMatch, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DocumentationContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DocumentationContractData.DeserializeDocumentationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the specified Documentation from an API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, documentationId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the specified Documentation from an API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, documentationId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all Documentations of the API Management service instance. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq | contains |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DocumentationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DocumentationListResult.DeserializeDocumentationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all Documentations of the API Management service instance. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq | contains |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServiceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DocumentationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DocumentationListResult.DeserializeDocumentationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/EmailTemplateRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/EmailTemplateRestOperations.cs index 949227840259c..bd7af54d87d65 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/EmailTemplateRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/EmailTemplateRestOperations.cs @@ -33,7 +33,7 @@ public EmailTemplateRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,8 +71,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Gets all email templates. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -103,8 +103,8 @@ public async Task> ListByServiceAsync(string s } /// Gets all email templates. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -157,8 +157,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the email template specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// The cancellation token to use. @@ -190,8 +190,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the email template specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// The cancellation token to use. @@ -245,8 +245,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the email template specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// The cancellation token to use. @@ -277,8 +277,8 @@ public async Task> GetAsync(string subs } /// Gets the details of the email template specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// The cancellation token to use. @@ -339,8 +339,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Updates an Email Template. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// Email Template update parameters. @@ -373,8 +373,8 @@ public async Task> CreateOrUpdateAsync( } /// Updates an Email Template. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// Email Template update parameters. @@ -434,8 +434,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates API Management email template. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -467,8 +467,8 @@ public async Task> UpdateAsync(string s } /// Updates API Management email template. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -523,8 +523,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Reset the Email Template to default template provided by the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -550,8 +550,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Reset the Email Template to default template provided by the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -592,8 +592,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Gets all email templates. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -626,8 +626,8 @@ public async Task> ListByServiceNextPageAsync( /// Gets all email templates. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayApiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayApiRestOperations.cs index 76c4195301021..32da567de64fc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayApiRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayApiRestOperations.cs @@ -33,7 +33,7 @@ public GatewayApiRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of the APIs associated with a gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -107,8 +107,8 @@ public async Task> ListByServiceAsyn } /// Lists a collection of the APIs associated with a gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -165,8 +165,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Checks that API entity specified by identifier is associated with the Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// API identifier. Must be unique in the current API Management service instance. @@ -201,8 +201,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Checks that API entity specified by identifier is associated with the Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// API identifier. Must be unique in the current API Management service instance. @@ -268,8 +268,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Adds an API to the specified Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// API identifier. Must be unique in the current API Management service instance. @@ -303,8 +303,8 @@ public async Task> CreateOrUpdateAsync(string subscript } /// Adds an API to the specified Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// API identifier. Must be unique in the current API Management service instance. @@ -362,8 +362,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified API from the specified Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// API identifier. Must be unique in the current API Management service instance. @@ -391,8 +391,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified API from the specified Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// API identifier. Must be unique in the current API Management service instance. @@ -435,8 +435,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of the APIs associated with a gateway. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -471,8 +471,8 @@ public async Task> ListByServiceNext /// Lists a collection of the APIs associated with a gateway. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayCertificateAuthorityRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayCertificateAuthorityRestOperations.cs index 6cb5d95623c48..dde9cc55527c9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayCertificateAuthorityRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayCertificateAuthorityRestOperations.cs @@ -33,7 +33,7 @@ public GatewayCertificateAuthorityRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists the collection of Certificate Authorities for the specified Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq, ne | |</br>. @@ -107,8 +107,8 @@ public async Task> ListByService } /// Lists the collection of Certificate Authorities for the specified Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq, ne | |</br>. @@ -165,8 +165,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -201,8 +201,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -261,8 +261,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get assigned Gateway Certificate Authority details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -296,8 +296,8 @@ public async Task> GetAsy } /// Get assigned Gateway Certificate Authority details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -363,8 +363,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Assign Certificate entity to Gateway entity as Certificate Authority. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -400,8 +400,8 @@ public async Task> Create } /// Assign Certificate entity to Gateway entity as Certificate Authority. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -462,8 +462,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Remove relationship between Certificate Authority and Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -492,8 +492,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Remove relationship between Certificate Authority and Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -537,8 +537,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists the collection of Certificate Authorities for the specified Gateway entity. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq, ne | |</br>. @@ -573,8 +573,8 @@ public async Task> ListByService /// Lists the collection of Certificate Authorities for the specified Gateway entity. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq, ne | |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayHostnameConfigurationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayHostnameConfigurationRestOperations.cs index 3dd8d429ed9f4..6b4795c2ad3ec 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayHostnameConfigurationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayHostnameConfigurationRestOperations.cs @@ -33,7 +33,7 @@ public GatewayHostnameConfigurationRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists the collection of hostname configurations for the specified gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -107,8 +107,8 @@ public async Task> ListByServic } /// Lists the collection of hostname configurations for the specified gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -165,8 +165,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -201,8 +201,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -261,8 +261,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get details of a hostname configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -296,8 +296,8 @@ public async Task> GetAs } /// Get details of a hostname configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -363,8 +363,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates of updates hostname configuration for a Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -400,8 +400,8 @@ public async Task> Creat } /// Creates of updates hostname configuration for a Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -462,8 +462,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified hostname configuration from the specified Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -492,8 +492,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified hostname configuration from the specified Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -537,8 +537,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists the collection of hostname configurations for the specified gateway. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -573,8 +573,8 @@ public async Task> ListByServic /// Lists the collection of hostname configurations for the specified gateway. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayRestOperations.cs index 26168982b7696..5edf8cbb5d7f0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayRestOperations.cs @@ -33,7 +33,7 @@ public GatewayRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,8 +71,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of gateways registered with service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -103,8 +103,8 @@ public async Task> ListByServiceAsync(string subscri } /// Lists a collection of gateways registered with service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -157,8 +157,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Gateway specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The cancellation token to use. @@ -191,8 +191,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Gateway specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The cancellation token to use. @@ -247,8 +247,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Gateway specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The cancellation token to use. @@ -280,8 +280,8 @@ public async Task> GetAsync(string subscripti } /// Gets the details of the Gateway specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The cancellation token to use. @@ -343,8 +343,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a Gateway to be used in Api Management instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The ApiManagementGateway to use. @@ -378,8 +378,8 @@ public async Task> CreateOrUpdateAsync(string } /// Creates or updates a Gateway to be used in Api Management instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The ApiManagementGateway to use. @@ -440,8 +440,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the gateway specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -474,8 +474,8 @@ public async Task> UpdateAsync(string subscri } /// Updates the details of the gateway specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -531,8 +531,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -559,8 +559,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -610,8 +610,8 @@ internal HttpMessage CreateListKeysRequest(string subscriptionId, string resourc } /// Retrieves gateway keys. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The cancellation token to use. @@ -641,8 +641,8 @@ public async Task> ListKeysAsync(string subscripti } /// Retrieves gateway keys. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The cancellation token to use. @@ -699,8 +699,8 @@ internal HttpMessage CreateRegenerateKeyRequest(string subscriptionId, string re } /// Regenerates specified gateway key invalidating any tokens created with it. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The GatewayKeyRegenerateContent to use. @@ -727,8 +727,8 @@ public async Task RegenerateKeyAsync(string subscriptionId, string res } /// Regenerates specified gateway key invalidating any tokens created with it. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The GatewayKeyRegenerateContent to use. @@ -782,8 +782,8 @@ internal HttpMessage CreateGenerateTokenRequest(string subscriptionId, string re } /// Gets the Shared Access Authorization Token for the gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The GatewayTokenRequestContract to use. @@ -815,8 +815,8 @@ public async Task> GenerateTokenAsync(string subs } /// Gets the Shared Access Authorization Token for the gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The GatewayTokenRequestContract to use. @@ -863,8 +863,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of gateways registered with service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -897,8 +897,8 @@ public async Task> ListByServiceNextPageAsync(string /// Lists a collection of gateways registered with service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GlobalSchemaRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GlobalSchemaRestOperations.cs index fd541b91c8c45..c98e44c89dad7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GlobalSchemaRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GlobalSchemaRestOperations.cs @@ -33,7 +33,7 @@ public GlobalSchemaRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,8 +71,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of schemas registered with service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -103,8 +103,8 @@ public async Task> ListByServiceAsync(string su } /// Lists a collection of schemas registered with service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -157,8 +157,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Schema specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -191,8 +191,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Schema specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -247,8 +247,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Schema specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -280,8 +280,8 @@ public async Task> GetAsync(string subsc } /// Gets the details of the Schema specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -343,8 +343,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates new or updates existing specified Schema of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -374,8 +374,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates new or updates existing specified Schema of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -428,8 +428,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific Schema. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -456,8 +456,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific Schema. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -499,8 +499,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of schemas registered with service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -533,8 +533,8 @@ public async Task> ListByServiceNextPageAsync(s /// Lists a collection of schemas registered with service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverPolicyRestOperations.cs new file mode 100644 index 0000000000000..253355ae26a97 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverPolicyRestOperations.cs @@ -0,0 +1,618 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class GraphQLApiResolverPolicyRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GraphQLApiResolverPolicyRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public GraphQLApiResolverPolicyRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListByResolverRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the list of policy configuration at the GraphQL API Resolver level. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByResolverAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateListByResolverRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PolicyListResult.DeserializePolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the list of policy configuration at the GraphQL API Resolver level. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByResolver(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateListByResolverRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PolicyListResult.DeserializePolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyExportFormat? format) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + if (format != null) + { + uri.AppendQuery("format", format.Value.ToString(), true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the policy configuration at the GraphQL API Resolver level. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId, format); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PolicyContractData.DeserializePolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PolicyContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the policy configuration at the GraphQL API Resolver level. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId, format); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PolicyContractData.DeserializePolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PolicyContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyContractData data, ETag? ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates policy configuration for the GraphQL API Resolver level. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// The policy contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + PolicyContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PolicyContractData.DeserializePolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates policy configuration for the GraphQL API Resolver level. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// The policy contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + PolicyContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PolicyContractData.DeserializePolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, ETag ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the policy configuration at the GraphQL Api Resolver. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the policy configuration at the GraphQL Api Resolver. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResolverNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the list of policy configuration at the GraphQL API Resolver level. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByResolverNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateListByResolverNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PolicyListResult.DeserializePolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the list of policy configuration at the GraphQL API Resolver level. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByResolverNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateListByResolverNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PolicyListResult.DeserializePolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverRestOperations.cs new file mode 100644 index 0000000000000..85d447c42a841 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverRestOperations.cs @@ -0,0 +1,711 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class GraphQLApiResolverRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GraphQLApiResolverRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public GraphQLApiResolverRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListByApiRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of the resolvers for the specified GraphQL API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByApiAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateListByApiRequest(subscriptionId, resourceGroupName, serviceName, apiId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResolverListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResolverListResult.DeserializeResolverListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of the resolvers for the specified GraphQL API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByApi(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateListByApiRequest(subscriptionId, resourceGroupName, serviceName, apiId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResolverListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResolverListResult.DeserializeResolverListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResolverContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResolverContractData.DeserializeResolverContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ResolverContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResolverContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResolverContractData.DeserializeResolverContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ResolverContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ResolverContractData data, ETag? ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates a new resolver in the GraphQL API or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ResolverContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + ResolverContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResolverContractData.DeserializeResolverContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a new resolver in the GraphQL API or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ResolverContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + ResolverContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResolverContractData.DeserializeResolverContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch, ResolverContractPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the details of the resolver in the GraphQL API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// GraphQL API Resolver Update parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch, ResolverContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, ifMatch, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResolverContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResolverContractData.DeserializeResolverContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the details of the resolver in the GraphQL API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// GraphQL API Resolver Update parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch, ResolverContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, ifMatch, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResolverContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResolverContractData.DeserializeResolverContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the specified resolver in the GraphQL API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the specified resolver in the GraphQL API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByApiNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of the resolvers for the specified GraphQL API. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByApiNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateListByApiNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, apiId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResolverListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResolverListResult.DeserializeResolverListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of the resolvers for the specified GraphQL API. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByApiNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateListByApiNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, apiId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResolverListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResolverListResult.DeserializeResolverListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupRestOperations.cs index d2b9d5b8f7806..59c3815224b64 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupRestOperations.cs @@ -33,7 +33,7 @@ public GroupRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,8 +71,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of groups defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| externalId | filter | eq | |</br>. /// Number of records to return. @@ -103,8 +103,8 @@ public async Task> ListByServiceAsync(string subscript } /// Lists a collection of groups defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| externalId | filter | eq | |</br>. /// Number of records to return. @@ -157,8 +157,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the group specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -191,8 +191,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the group specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -247,8 +247,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the group specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -280,8 +280,8 @@ public async Task> GetAsync(string subscription } /// Gets the details of the group specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -343,8 +343,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates a group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// Create parameters. @@ -378,8 +378,8 @@ public async Task> CreateOrUpdateAsync(string s } /// Creates or Updates a group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// Create parameters. @@ -440,8 +440,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the group specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -474,8 +474,8 @@ public async Task> UpdateAsync(string subscript } /// Updates the details of the group specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -531,8 +531,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific group of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -559,8 +559,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific group of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -602,8 +602,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of groups defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| externalId | filter | eq | |</br>. /// Number of records to return. @@ -636,8 +636,8 @@ public async Task> ListByServiceNextPageAsync(string n /// Lists a collection of groups defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| externalId | filter | eq | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupUserRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupUserRestOperations.cs index d184feb34eaf2..59f7375930130 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupUserRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupUserRestOperations.cs @@ -33,7 +33,7 @@ public GroupUserRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists a collection of user entities associated with the group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -107,8 +107,8 @@ public async Task> ListAsync(string s } /// Lists a collection of user entities associated with the group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -165,8 +165,8 @@ internal HttpMessage CreateCheckEntityExistsRequest(string subscriptionId, strin } /// Checks that user entity specified by identifier is associated with the group entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// User identifier. Must be unique in the current API Management service instance. @@ -201,8 +201,8 @@ public async Task> CheckEntityExistsAsync(string subscriptionId, } /// Checks that user entity specified by identifier is associated with the group entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// User identifier. Must be unique in the current API Management service instance. @@ -261,8 +261,8 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Add existing user to existing group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// User identifier. Must be unique in the current API Management service instance. @@ -295,8 +295,8 @@ public async Task> CreateAsync(string subsc } /// Add existing user to existing group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// User identifier. Must be unique in the current API Management service instance. @@ -353,8 +353,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Remove existing user from existing group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// User identifier. Must be unique in the current API Management service instance. @@ -382,8 +382,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Remove existing user from existing group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// User identifier. Must be unique in the current API Management service instance. @@ -426,8 +426,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists a collection of user entities associated with the group. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -462,8 +462,8 @@ public async Task> ListNextPageAsync( /// Lists a collection of user entities associated with the group. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IdentityProviderRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IdentityProviderRestOperations.cs index 378aa6d7cccd9..a5ae2da2b76a8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IdentityProviderRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IdentityProviderRestOperations.cs @@ -33,7 +33,7 @@ public IdentityProviderRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -59,8 +59,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of Identity Provider configured in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -88,8 +88,8 @@ public async Task> ListByServiceAsync(string subs } /// Lists a collection of Identity Provider configured in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -139,8 +139,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the identityProvider specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// The cancellation token to use. @@ -172,8 +172,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the identityProvider specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// The cancellation token to use. @@ -227,8 +227,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the configuration details of the identity Provider configured in specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// The cancellation token to use. @@ -259,8 +259,8 @@ public async Task> GetAsync(string s } /// Gets the configuration details of the identity Provider configured in specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// The cancellation token to use. @@ -321,8 +321,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates the IdentityProvider configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// Create parameters. @@ -355,8 +355,8 @@ public async Task> CreateOrUpdateAsy } /// Creates or Updates the IdentityProvider configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// Create parameters. @@ -416,8 +416,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an existing IdentityProvider configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -449,8 +449,8 @@ public async Task> UpdateAsync(strin } /// Updates an existing IdentityProvider configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -505,8 +505,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified identity provider configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -532,8 +532,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified identity provider configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -582,8 +582,8 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// Gets the client secret details of the Identity Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// The cancellation token to use. @@ -612,8 +612,8 @@ public async Task> ListSecretsAsync(string subscr } /// Gets the client secret details of the Identity Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// The cancellation token to use. @@ -657,8 +657,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of Identity Provider configured in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. @@ -688,8 +688,8 @@ public async Task> ListByServiceNextPageAsync(str /// Lists a collection of Identity Provider configured in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IssueRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IssueRestOperations.cs index d08359464c46a..f496c5b832952 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IssueRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IssueRestOperations.cs @@ -33,7 +33,7 @@ public IssueRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,8 +71,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of issues in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. /// Number of records to return. @@ -103,8 +103,8 @@ public async Task> ListByServiceAsync(string subscript } /// Lists a collection of issues in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. /// Number of records to return. @@ -157,8 +157,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets API Management issue details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Issue identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -190,8 +190,8 @@ public async Task> GetAsync(string subscriptionId, s } /// Gets API Management issue details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Issue identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -238,8 +238,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of issues in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. /// Number of records to return. @@ -272,8 +272,8 @@ public async Task> ListByServiceNextPageAsync(string n /// Lists a collection of issues in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/LoggerRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/LoggerRestOperations.cs index 31ff806591be9..f4da11055365b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/LoggerRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/LoggerRestOperations.cs @@ -33,7 +33,7 @@ public LoggerRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,8 +71,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of loggers in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| loggerType | filter | eq | |</br>| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -103,8 +103,8 @@ public async Task> ListByServiceAsync(string subscrip } /// Lists a collection of loggers in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| loggerType | filter | eq | |</br>| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -157,8 +157,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the logger specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// The cancellation token to use. @@ -191,8 +191,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the logger specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// The cancellation token to use. @@ -247,8 +247,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the logger specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// The cancellation token to use. @@ -280,8 +280,8 @@ public async Task> GetAsync(string subscriptio } /// Gets the details of the logger specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// The cancellation token to use. @@ -343,8 +343,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates a logger. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// Create parameters. @@ -378,8 +378,8 @@ public async Task> CreateOrUpdateAsync(string } /// Creates or Updates a logger. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// Create parameters. @@ -440,8 +440,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an existing logger. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -474,8 +474,8 @@ public async Task> UpdateAsync(string subscrip } /// Updates an existing logger. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -531,8 +531,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified logger. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -559,8 +559,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified logger. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -602,8 +602,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of loggers in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| loggerType | filter | eq | |</br>| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -636,8 +636,8 @@ public async Task> ListByServiceNextPageAsync(string /// Lists a collection of loggers in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| loggerType | filter | eq | |</br>| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NamedValueRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NamedValueRestOperations.cs index 77ffcce7803f2..25c3fbe204080 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NamedValueRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NamedValueRestOperations.cs @@ -33,7 +33,7 @@ public NamedValueRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,8 +75,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of named values defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -108,8 +108,8 @@ public async Task> ListByServiceAsync(string subs } /// Lists a collection of named values defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -163,8 +163,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -197,8 +197,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -253,8 +253,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -286,8 +286,8 @@ public async Task> GetAsync(string subscri } /// Gets the details of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -349,8 +349,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates named value. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// Create parameters. @@ -380,8 +380,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates named value. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// Create parameters. @@ -438,8 +438,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the specific named value. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -468,8 +468,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Updates the specific named value. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -521,8 +521,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific named value from the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -549,8 +549,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific named value from the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -600,8 +600,8 @@ internal HttpMessage CreateListValueRequest(string subscriptionId, string resour } /// Gets the secret of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -631,8 +631,8 @@ public async Task> ListValueAsync(string subs } /// Gets the secret of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -685,8 +685,8 @@ internal HttpMessage CreateRefreshSecretRequest(string subscriptionId, string re } /// Refresh the secret of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -712,8 +712,8 @@ public async Task RefreshSecretAsync(string subscriptionId, string res } /// Refresh the secret of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -754,8 +754,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of named values defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -789,8 +789,8 @@ public async Task> ListByServiceNextPageAsync(str /// Lists a collection of named values defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NetworkStatusRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NetworkStatusRestOperations.cs index f948fbc9c45c9..9a012434bb822 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NetworkStatusRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NetworkStatusRestOperations.cs @@ -34,7 +34,7 @@ public NetworkStatusRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -60,8 +60,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -94,8 +94,8 @@ public async Task>> Li } /// Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -151,8 +151,8 @@ internal HttpMessage CreateListByLocationRequest(string subscriptionId, string r } /// Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Location in which the API Management service is deployed. This is one of the Azure Regions like West US, East US, South Central US. /// The cancellation token to use. @@ -181,8 +181,8 @@ public async Task> ListByLocationAsync(string su } /// Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Location in which the API Management service is deployed. This is one of the Azure Regions like West US, East US, South Central US. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientEmailRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientEmailRestOperations.cs index ec774781433e1..225d009ce7e69 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientEmailRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientEmailRestOperations.cs @@ -33,7 +33,7 @@ public NotificationRecipientEmailRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -61,8 +61,8 @@ internal HttpMessage CreateListByNotificationRequest(string subscriptionId, stri } /// Gets the list of the Notification Recipient Emails subscribed to a notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// The cancellation token to use. @@ -91,8 +91,8 @@ public async Task> ListByNotificationAsync(st } /// Gets the list of the Notification Recipient Emails subscribed to a notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// The cancellation token to use. @@ -145,8 +145,8 @@ internal HttpMessage CreateCheckEntityExistsRequest(string subscriptionId, strin } /// Determine if Notification Recipient Email subscribed to the notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// Email identifier. @@ -180,8 +180,8 @@ public async Task> CheckEntityExistsAsync(string subscriptionId, } /// Determine if Notification Recipient Email subscribed to the notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// Email identifier. @@ -239,8 +239,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Adds the Email address to the list of Recipients for the Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// Email identifier. @@ -272,8 +272,8 @@ public async Task> CreateOrUpdateAsync(string s } /// Adds the Email address to the list of Recipients for the Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// Email identifier. @@ -329,8 +329,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Removes the email from the list of Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// Email identifier. @@ -357,8 +357,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Removes the email from the list of Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// Email identifier. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientUserRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientUserRestOperations.cs index 693f735626df8..333715c8d0aa0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientUserRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientUserRestOperations.cs @@ -33,7 +33,7 @@ public NotificationRecipientUserRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -61,8 +61,8 @@ internal HttpMessage CreateListByNotificationRequest(string subscriptionId, stri } /// Gets the list of the Notification Recipient User subscribed to the notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// The cancellation token to use. @@ -91,8 +91,8 @@ public async Task> ListByNotificationAsync(str } /// Gets the list of the Notification Recipient User subscribed to the notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// The cancellation token to use. @@ -145,8 +145,8 @@ internal HttpMessage CreateCheckEntityExistsRequest(string subscriptionId, strin } /// Determine if the Notification Recipient User is subscribed to the notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// User identifier. Must be unique in the current API Management service instance. @@ -180,8 +180,8 @@ public async Task> CheckEntityExistsAsync(string subscriptionId, } /// Determine if the Notification Recipient User is subscribed to the notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// User identifier. Must be unique in the current API Management service instance. @@ -239,8 +239,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Adds the API Management User to the list of Recipients for the Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// User identifier. Must be unique in the current API Management service instance. @@ -272,8 +272,8 @@ public async Task> CreateOrUpdateAsync(string su } /// Adds the API Management User to the list of Recipients for the Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// User identifier. Must be unique in the current API Management service instance. @@ -329,8 +329,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Removes the API Management user from the list of Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// User identifier. Must be unique in the current API Management service instance. @@ -357,8 +357,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Removes the API Management user from the list of Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// User identifier. Must be unique in the current API Management service instance. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRestOperations.cs index 89141a266e84d..09d8a16783a75 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRestOperations.cs @@ -33,7 +33,7 @@ public NotificationRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -67,8 +67,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of properties defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. @@ -98,8 +98,8 @@ public async Task> ListByServiceAsync(string su } /// Lists a collection of properties defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. @@ -151,8 +151,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Notification specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// The cancellation token to use. @@ -183,8 +183,8 @@ public async Task> GetAsync(string subsc } /// Gets the details of the Notification specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// The cancellation token to use. @@ -241,8 +241,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or Update API Management publisher notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -272,8 +272,8 @@ public async Task> CreateOrUpdateAsync(s } /// Create or Update API Management publisher notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -318,8 +318,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of properties defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. @@ -351,8 +351,8 @@ public async Task> ListByServiceNextPageAsync(s /// Lists a collection of properties defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OpenIdConnectProviderRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OpenIdConnectProviderRestOperations.cs index 9440dca4fcfb7..568542dc27cb2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OpenIdConnectProviderRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OpenIdConnectProviderRestOperations.cs @@ -33,7 +33,7 @@ public OpenIdConnectProviderRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,8 +71,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists of all the OpenId Connect Providers. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -103,8 +103,8 @@ public async Task> ListByServiceAsync( } /// Lists of all the OpenId Connect Providers. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -157,8 +157,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// The cancellation token to use. @@ -191,8 +191,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// The cancellation token to use. @@ -247,8 +247,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets specific OpenID Connect Provider without secrets. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// The cancellation token to use. @@ -280,8 +280,8 @@ public async Task> GetAsync(str } /// Gets specific OpenID Connect Provider without secrets. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// The cancellation token to use. @@ -343,8 +343,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates the OpenID Connect Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// Create parameters. @@ -378,8 +378,8 @@ public async Task> CreateOrUpda } /// Creates or updates the OpenID Connect Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// Create parameters. @@ -440,8 +440,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the specific OpenID Connect Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -474,8 +474,8 @@ public async Task> UpdateAsync( } /// Updates the specific OpenID Connect Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -531,8 +531,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific OpenID Connect Provider of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -559,8 +559,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific OpenID Connect Provider of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -610,8 +610,8 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// Gets the client secret details of the OpenID Connect Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// The cancellation token to use. @@ -641,8 +641,8 @@ public async Task> ListSecretsAsync(string subscr } /// Gets the client secret details of the OpenID Connect Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// The cancellation token to use. @@ -687,8 +687,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists of all the OpenId Connect Providers. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -721,8 +721,8 @@ public async Task> ListByServiceNextPa /// Lists of all the OpenId Connect Providers. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OperationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OperationRestOperations.cs index 11ff847f05ecd..2b1919d2ba655 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OperationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OperationRestOperations.cs @@ -33,7 +33,7 @@ public OperationRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -77,8 +77,8 @@ internal HttpMessage CreateListByTagsRequest(string subscriptionId, string resou } /// Lists a collection of operations associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -112,8 +112,8 @@ public async Task> ListByTagsAsync(string subscr } /// Lists a collection of operations associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -162,8 +162,8 @@ internal HttpMessage CreateListByTagsNextPageRequest(string nextLink, string sub /// Lists a collection of operations associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -199,8 +199,8 @@ public async Task> ListByTagsNextPageAsync(strin /// Lists a collection of operations associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OutboundNetworkDependenciesEndpointsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OutboundNetworkDependenciesEndpointsRestOperations.cs index 6d3684c38d520..41b13a59aa79f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OutboundNetworkDependenciesEndpointsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OutboundNetworkDependenciesEndpointsRestOperations.cs @@ -33,7 +33,7 @@ public OutboundNetworkDependenciesEndpointsRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -59,8 +59,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Gets the network endpoints of all outbound dependencies of a ApiManagement service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -88,8 +88,8 @@ public async Task> ListByServiceAsync( } /// Gets the network endpoints of all outbound dependencies of a ApiManagement service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyDescriptionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyDescriptionRestOperations.cs index 6609aeb8ad4e6..b1e2f3d3a389e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyDescriptionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyDescriptionRestOperations.cs @@ -33,7 +33,7 @@ public PolicyDescriptionRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -63,8 +63,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all policy descriptions. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Policy scope. /// The cancellation token to use. @@ -93,8 +93,8 @@ public async Task> ListByServiceAsync(stri } /// Lists all policy descriptions. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Policy scope. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyFragmentRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyFragmentRestOperations.cs new file mode 100644 index 0000000000000..5980f571fefe0 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyFragmentRestOperations.cs @@ -0,0 +1,595 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class PolicyFragmentRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PolicyFragmentRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public PolicyFragmentRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListByServiceRequest(string subscriptionId, string resourceGroupName, string serviceName, string filter, string orderBy, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (orderBy != null) + { + uri.AppendQuery("$orderby", orderBy, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all policy fragments. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// OData order by query option. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceAsync(string subscriptionId, string resourceGroupName, string serviceName, string filter = null, string orderBy = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName, filter, orderBy, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyFragmentListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PolicyFragmentListResult.DeserializePolicyFragmentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all policy fragments. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// OData order by query option. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByService(string subscriptionId, string resourceGroupName, string serviceName, string filter = null, string orderBy = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName, filter, orderBy, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyFragmentListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PolicyFragmentListResult.DeserializePolicyFragmentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string id) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string id, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, id); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string id, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, id); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContentFormat? format) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (format != null) + { + uri.AppendQuery("format", format.Value.ToString(), true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, id, format); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyFragmentContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PolicyFragmentContractData.DeserializePolicyFragmentContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PolicyFragmentContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, id, format); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyFragmentContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PolicyFragmentContractData.DeserializePolicyFragmentContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PolicyFragmentContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContractData data, ETag? ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// The policy fragment contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, id, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// The policy fragment contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, id, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string id, ETag ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string id, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, id, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string id, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, id, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListReferencesRequest(string subscriptionId, string resourceGroupName, string serviceName, string id, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendPath("/listReferences", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists policy resources that reference the policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListReferencesAsync(string subscriptionId, string resourceGroupName, string serviceName, string id, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateListReferencesRequest(subscriptionId, resourceGroupName, serviceName, id, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResourceListResult.DeserializeResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists policy resources that reference the policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListReferences(string subscriptionId, string resourceGroupName, string serviceName, string id, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateListReferencesRequest(subscriptionId, resourceGroupName, serviceName, id, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResourceListResult.DeserializeResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestOperations.cs index bfcb2325068f9..5c53b3adc2f04 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestOperations.cs @@ -33,7 +33,7 @@ public PolicyRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -59,8 +59,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all the Global Policy definitions of the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -88,8 +88,8 @@ public async Task> ListByServiceAsync(string subscrip } /// Lists all the Global Policy definitions of the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -139,8 +139,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// The cancellation token to use. @@ -172,8 +172,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// The cancellation token to use. @@ -231,8 +231,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the Global policy definition of the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// Policy Export Format. @@ -264,8 +264,8 @@ public async Task> GetAsync(string subscriptionId, } /// Get the Global policy definition of the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// Policy Export Format. @@ -327,8 +327,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates the global policy configuration of the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// The policy contents to apply. @@ -361,8 +361,8 @@ public async Task> CreateOrUpdateAsync(string subsc } /// Creates or updates the global policy configuration of the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// The policy contents to apply. @@ -418,8 +418,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the global policy configuration of the Api Management Service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -445,8 +445,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the global policy configuration of the Api Management Service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalConfigRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalConfigRestOperations.cs new file mode 100644 index 0000000000000..56ba8ba5e8932 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalConfigRestOperations.cs @@ -0,0 +1,487 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class PortalConfigRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PortalConfigRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public PortalConfigRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListByServiceRequest(string subscriptionId, string resourceGroupName, string serviceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the developer portal configurations. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PortalConfigListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PortalConfigListResult.DeserializePortalConfigListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the developer portal configurations. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByService(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PortalConfigListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PortalConfigListResult.DeserializePortalConfigListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PortalConfigContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PortalConfigContractData.DeserializePortalConfigContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PortalConfigContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PortalConfigContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PortalConfigContractData.DeserializePortalConfigContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PortalConfigContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId, ifMatch, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PortalConfigContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PortalConfigContractData.DeserializePortalConfigContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId, ifMatch, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PortalConfigContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PortalConfigContractData.DeserializePortalConfigContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId, ifMatch, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PortalConfigContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PortalConfigContractData.DeserializePortalConfigContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId, ifMatch, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PortalConfigContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PortalConfigContractData.DeserializePortalConfigContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalRevisionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalRevisionRestOperations.cs index 5f7b8e0eb9405..b0308d71648e6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalRevisionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalRevisionRestOperations.cs @@ -33,7 +33,7 @@ public PortalRevisionRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,8 +71,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists developer portal's revisions. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// /// | Field | Supported operators | Supported functions | @@ -111,8 +111,8 @@ public async Task> ListByServiceAsync(string } /// Lists developer portal's revisions. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// /// | Field | Supported operators | Supported functions | @@ -173,8 +173,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the developer portal revision specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -207,8 +207,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the developer portal revision specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -263,8 +263,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the developer portal's revision specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -296,8 +296,8 @@ public async Task> GetAsync(string sub } /// Gets the developer portal's revision specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -355,8 +355,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// The ApiManagementPortalRevision to use. @@ -384,8 +384,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// The ApiManagementPortalRevision to use. @@ -440,8 +440,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the description of specified portal revision or makes it current. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -470,8 +470,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Updates the description of specified portal revision or makes it current. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -515,8 +515,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists developer portal's revisions. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// /// | Field | Supported operators | Supported functions | @@ -557,8 +557,8 @@ public async Task> ListByServiceNextPageAsync /// Lists developer portal's revisions. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// /// | Field | Supported operators | Supported functions | diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalSettingsRestOperations.cs index 3172d33c04fa4..ef0f69821cbca 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalSettingsRestOperations.cs @@ -33,7 +33,7 @@ public PortalSettingsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -59,8 +59,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of portalsettings defined within a service instance.. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -88,8 +88,8 @@ public async Task> ListByServiceAsync(string } /// Lists a collection of portalsettings defined within a service instance.. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs index 334c6d04d2021..1a527d23c796d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs @@ -33,7 +33,7 @@ public PrivateEndpointConnectionRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -59,8 +59,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all private endpoint connections of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -88,8 +88,8 @@ public async Task> Li } /// Lists all private endpoint connections of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -139,8 +139,8 @@ internal HttpMessage CreateGetByNameRequest(string subscriptionId, string resour } /// Gets the details of the Private Endpoint Connection specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private endpoint connection. /// The cancellation token to use. @@ -172,8 +172,8 @@ public async Task> GetByNam } /// Gets the details of the Private Endpoint Connection specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private endpoint connection. /// The cancellation token to use. @@ -231,8 +231,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Private Endpoint Connection or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private endpoint connection. /// The ApiManagementPrivateEndpointConnectionCreateOrUpdateContent to use. @@ -260,8 +260,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates a new Private Endpoint Connection or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private endpoint connection. /// The ApiManagementPrivateEndpointConnectionCreateOrUpdateContent to use. @@ -311,8 +311,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified Private Endpoint Connection. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private endpoint connection. /// The cancellation token to use. @@ -339,8 +339,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified Private Endpoint Connection. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private endpoint connection. /// The cancellation token to use. @@ -388,8 +388,8 @@ internal HttpMessage CreateListPrivateLinkResourcesRequest(string subscriptionId } /// Gets the private link resources. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -417,8 +417,8 @@ public async Task> ListPriv } /// Gets the private link resources. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -468,8 +468,8 @@ internal HttpMessage CreateGetPrivateLinkResourceRequest(string subscriptionId, } /// Gets the private link resources. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private link resource. /// The cancellation token to use. @@ -501,8 +501,8 @@ public async Task> GetPrivateLink } /// Gets the private link resources. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private link resource. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiRestOperations.cs index 4fd75fe05ef93..e18f573ee5179 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiRestOperations.cs @@ -33,7 +33,7 @@ public ProductApiRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByProductRequest(string subscriptionId, string re } /// Lists a collection of the APIs associated with a product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -107,8 +107,8 @@ public async Task> ListByProductAsyn } /// Lists a collection of the APIs associated with a product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -165,8 +165,8 @@ internal HttpMessage CreateCheckEntityExistsRequest(string subscriptionId, strin } /// Checks that API entity specified by identifier is associated with the Product entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @@ -201,8 +201,8 @@ public async Task> CheckEntityExistsAsync(string subscriptionId, } /// Checks that API entity specified by identifier is associated with the Product entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @@ -261,8 +261,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Adds an API to the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @@ -295,8 +295,8 @@ public async Task> CreateOrUpdateAsync(string subscript } /// Adds an API to the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @@ -353,8 +353,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified API from the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @@ -382,8 +382,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified API from the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @@ -426,8 +426,8 @@ internal HttpMessage CreateListByProductNextPageRequest(string nextLink, string /// Lists a collection of the APIs associated with a product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -462,8 +462,8 @@ public async Task> ListByProductNext /// Lists a collection of the APIs associated with a product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupRestOperations.cs index 28489ace25add..484e4ed95078d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupRestOperations.cs @@ -33,7 +33,7 @@ public ProductGroupRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByProductRequest(string subscriptionId, string re } /// Lists the collection of developer groups associated with the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | |</br>| displayName | filter | eq, ne | |</br>| description | filter | eq, ne | |</br>. @@ -107,8 +107,8 @@ public async Task> ListByProductAs } /// Lists the collection of developer groups associated with the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | |</br>| displayName | filter | eq, ne | |</br>| description | filter | eq, ne | |</br>. @@ -165,8 +165,8 @@ internal HttpMessage CreateCheckEntityExistsRequest(string subscriptionId, strin } /// Checks that Group entity specified by identifier is associated with the Product entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Group identifier. Must be unique in the current API Management service instance. @@ -201,8 +201,8 @@ public async Task> CheckEntityExistsAsync(string subscriptionId, } /// Checks that Group entity specified by identifier is associated with the Product entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Group identifier. Must be unique in the current API Management service instance. @@ -261,8 +261,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Adds the association between the specified developer group with the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Group identifier. Must be unique in the current API Management service instance. @@ -295,8 +295,8 @@ public async Task> CreateOrUpdateAsync(string subscri } /// Adds the association between the specified developer group with the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Group identifier. Must be unique in the current API Management service instance. @@ -353,8 +353,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the association between the specified group and product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Group identifier. Must be unique in the current API Management service instance. @@ -382,8 +382,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the association between the specified group and product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Group identifier. Must be unique in the current API Management service instance. @@ -426,8 +426,8 @@ internal HttpMessage CreateListByProductNextPageRequest(string nextLink, string /// Lists the collection of developer groups associated with the specified product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | |</br>| displayName | filter | eq, ne | |</br>| description | filter | eq, ne | |</br>. @@ -462,8 +462,8 @@ public async Task> ListByProductNe /// Lists the collection of developer groups associated with the specified product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | |</br>| displayName | filter | eq, ne | |</br>| description | filter | eq, ne | |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductPolicyRestOperations.cs index e678181bea6de..6c3de84b7a54f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductPolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductPolicyRestOperations.cs @@ -33,7 +33,7 @@ public ProductPolicyRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -61,8 +61,8 @@ internal HttpMessage CreateListByProductRequest(string subscriptionId, string re } /// Get the policy configuration at the Product level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -92,8 +92,8 @@ public async Task> ListByProductAsync(string subscrip } /// Get the policy configuration at the Product level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -147,8 +147,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Get the ETag of the policy configuration at the Product level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -182,8 +182,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Get the ETag of the policy configuration at the Product level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -245,8 +245,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the policy configuration at the Product level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -280,8 +280,8 @@ public async Task> GetAsync(string subscriptionId, } /// Get the policy configuration at the Product level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -347,8 +347,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates policy configuration for the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -383,8 +383,8 @@ public async Task> CreateOrUpdateAsync(string subsc } /// Creates or updates policy configuration for the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -444,8 +444,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the policy configuration at the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -473,8 +473,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the policy configuration at the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductRestOperations.cs index 984cc09406b0a..0296f09831228 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductRestOperations.cs @@ -33,7 +33,7 @@ public ProductRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -79,8 +79,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of products in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -113,8 +113,8 @@ public async Task> ListByServiceAsync(string subscri } /// Lists a collection of products in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -169,8 +169,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the product specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -203,8 +203,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the product specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -259,8 +259,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the product specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -292,8 +292,8 @@ public async Task> GetAsync(string subscripti } /// Gets the details of the product specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -355,8 +355,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates a product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -390,8 +390,8 @@ public async Task> CreateOrUpdateAsync(string } /// Creates or Updates a product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -452,8 +452,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update existing product details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -486,8 +486,8 @@ public async Task> UpdateAsync(string subscri } /// Update existing product details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -547,8 +547,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -576,8 +576,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -642,8 +642,8 @@ internal HttpMessage CreateListByTagsRequest(string subscriptionId, string resou } /// Lists a collection of products associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -675,8 +675,8 @@ public async Task> ListByTagsAsync(string subscr } /// Lists a collection of products associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -723,8 +723,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of products in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -759,8 +759,8 @@ public async Task> ListByServiceNextPageAsync(string /// Lists a collection of products in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -809,8 +809,8 @@ internal HttpMessage CreateListByTagsNextPageRequest(string nextLink, string sub /// Lists a collection of products associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -844,8 +844,8 @@ public async Task> ListByTagsNextPageAsync(strin /// Lists a collection of products associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductSubscriptionsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductSubscriptionsRestOperations.cs index cf61410e20686..6505d2b6e1f30 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductSubscriptionsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductSubscriptionsRestOperations.cs @@ -33,7 +33,7 @@ public ProductSubscriptionsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists the collection of subscriptions to the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. @@ -107,8 +107,8 @@ public async Task> ListAsync(string subscriptio } /// Lists the collection of subscriptions to the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. @@ -156,8 +156,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists the collection of subscriptions to the specified product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. @@ -192,8 +192,8 @@ public async Task> ListNextPageAsync(string nex /// Lists the collection of subscriptions to the specified product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductWikiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductWikiRestOperations.cs new file mode 100644 index 0000000000000..08bf07d8f976a --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductWikiRestOperations.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class ProductWikiRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ProductWikiRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ProductWikiRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string productId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string productId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, productId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string productId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, productId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string productId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the Wiki for a Product specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string productId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, productId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WikiContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the Wiki for a Product specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string productId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, productId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WikiContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string productId, WikiContractData data, ETag? ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates a new Wiki for a Product or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string productId, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, productId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + WikiContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a new Wiki for a Product or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string productId, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, productId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + WikiContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch, WikiUpdateContract wikiUpdateContract) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(wikiUpdateContract); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the details of the Wiki for a Product specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, productId, ifMatch, wikiUpdateContract); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the details of the Wiki for a Product specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, productId, ifMatch, wikiUpdateContract); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the specified Wiki from a Product. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, productId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the specified Wiki from a Product. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, productId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByCounterKeysRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByCounterKeysRestOperations.cs index 776321f27d589..91024d7ecf442 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByCounterKeysRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByCounterKeysRestOperations.cs @@ -33,7 +33,7 @@ public QuotaByCounterKeysRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -60,8 +60,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// The cancellation token to use. @@ -91,8 +91,8 @@ public async Task> ListByServiceAsync(string su } /// Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// The cancellation token to use. @@ -148,8 +148,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// The value of the quota counter to be applied to all quota counter periods. @@ -181,8 +181,8 @@ public async Task> UpdateAsync(string subscript } /// Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// The value of the quota counter to be applied to all quota counter periods. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByPeriodKeysRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByPeriodKeysRestOperations.cs index 627d9ea25cb09..3963b5c4e4ce1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByPeriodKeysRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByPeriodKeysRestOperations.cs @@ -33,7 +33,7 @@ public QuotaByPeriodKeysRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -62,8 +62,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// Quota period key identifier. @@ -95,8 +95,8 @@ public async Task> GetAsync(string subscriptionId } /// Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// Quota period key identifier. @@ -156,8 +156,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an existing quota counter value in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// Quota period key identifier. @@ -191,8 +191,8 @@ public async Task> UpdateAsync(string subscriptio } /// Updates an existing quota counter value in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// Quota period key identifier. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/RegionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/RegionRestOperations.cs index f7d52add08f0d..ef48088e7bbda 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/RegionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/RegionRestOperations.cs @@ -33,7 +33,7 @@ public RegionRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -59,8 +59,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all azure regions in which the service exists. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -88,8 +88,8 @@ public async Task> ListByServiceAsync(string subscrip } /// Lists all azure regions in which the service exists. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -132,8 +132,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all azure regions in which the service exists. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. @@ -163,8 +163,8 @@ public async Task> ListByServiceNextPageAsync(string /// Lists all azure regions in which the service exists. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ReportsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ReportsRestOperations.cs index aac9218c91ffa..95a51a466ff22 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ReportsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ReportsRestOperations.cs @@ -33,7 +33,7 @@ public ReportsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -72,8 +72,8 @@ internal HttpMessage CreateListByApiRequest(string subscriptionId, string resour } /// Lists report records by API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The filter to apply on the operation. /// Number of records to return. @@ -106,8 +106,8 @@ public async Task> ListByApiAsync(string subscription } /// Lists report records by API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The filter to apply on the operation. /// Number of records to return. @@ -174,8 +174,8 @@ internal HttpMessage CreateListByUserRequest(string subscriptionId, string resou } /// Lists report records by User. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| userId | select, filter | eq | | </br>| apiRegion | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -208,8 +208,8 @@ public async Task> ListByUserAsync(string subscriptio } /// Lists report records by User. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| userId | select, filter | eq | | </br>| apiRegion | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -276,8 +276,8 @@ internal HttpMessage CreateListByOperationRequest(string subscriptionId, string } /// Lists report records by API Operations. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -310,8 +310,8 @@ public async Task> ListByOperationAsync(string subscr } /// Lists report records by API Operations. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -378,8 +378,8 @@ internal HttpMessage CreateListByProductRequest(string subscriptionId, string re } /// Lists report records by Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -412,8 +412,8 @@ public async Task> ListByProductAsync(string subscrip } /// Lists report records by Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -476,8 +476,8 @@ internal HttpMessage CreateListByGeoRequest(string subscriptionId, string resour } /// Lists report records by geography. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| country | select | | | </br>| region | select | | | </br>| zip | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -509,8 +509,8 @@ public async Task> ListByGeoAsync(string subscription } /// Lists report records by geography. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| country | select | | | </br>| region | select | | | </br>| zip | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -576,8 +576,8 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, stri } /// Lists report records by subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | select, filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -610,8 +610,8 @@ public async Task> ListBySubscriptionAsync(string sub } /// Lists report records by subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | select, filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -679,8 +679,8 @@ internal HttpMessage CreateListByTimeRequest(string subscriptionId, string resou } /// Lists report records by Time. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter, select | ge, le | | </br>| interval | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). @@ -714,8 +714,8 @@ public async Task> ListByTimeAsync(string subscriptio } /// Lists report records by Time. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter, select | ge, le | | </br>| interval | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). @@ -779,8 +779,8 @@ internal HttpMessage CreateListByRequestRequest(string subscriptionId, string re } /// Lists report records by Request. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| productId | filter | eq | | </br>| userId | filter | eq | | </br>| apiRegion | filter | eq | | </br>| subscriptionId | filter | eq | | </br>. /// Number of records to return. @@ -812,8 +812,8 @@ public async Task> ListByRequestAsync(string s } /// Lists report records by Request. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| productId | filter | eq | | </br>| userId | filter | eq | | </br>| apiRegion | filter | eq | | </br>| subscriptionId | filter | eq | | </br>. /// Number of records to return. @@ -860,8 +860,8 @@ internal HttpMessage CreateListByApiNextPageRequest(string nextLink, string subs /// Lists report records by API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The filter to apply on the operation. /// Number of records to return. @@ -896,8 +896,8 @@ public async Task> ListByApiNextPageAsync(string next /// Lists report records by API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The filter to apply on the operation. /// Number of records to return. @@ -946,8 +946,8 @@ internal HttpMessage CreateListByUserNextPageRequest(string nextLink, string sub /// Lists report records by User. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| userId | select, filter | eq | | </br>| apiRegion | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -982,8 +982,8 @@ public async Task> ListByUserNextPageAsync(string nex /// Lists report records by User. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| userId | select, filter | eq | | </br>| apiRegion | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1032,8 +1032,8 @@ internal HttpMessage CreateListByOperationNextPageRequest(string nextLink, strin /// Lists report records by API Operations. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1068,8 +1068,8 @@ public async Task> ListByOperationNextPageAsync(strin /// Lists report records by API Operations. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1118,8 +1118,8 @@ internal HttpMessage CreateListByProductNextPageRequest(string nextLink, string /// Lists report records by Product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1154,8 +1154,8 @@ public async Task> ListByProductNextPageAsync(string /// Lists report records by Product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1204,8 +1204,8 @@ internal HttpMessage CreateListByGeoNextPageRequest(string nextLink, string subs /// Lists report records by geography. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| country | select | | | </br>| region | select | | | </br>| zip | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1239,8 +1239,8 @@ public async Task> ListByGeoNextPageAsync(string next /// Lists report records by geography. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| country | select | | | </br>| region | select | | | </br>| zip | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1288,8 +1288,8 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Lists report records by subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | select, filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1324,8 +1324,8 @@ public async Task> ListBySubscriptionNextPageAsync(st /// Lists report records by subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | select, filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1374,8 +1374,8 @@ internal HttpMessage CreateListByTimeNextPageRequest(string nextLink, string sub /// Lists report records by Time. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter, select | ge, le | | </br>| interval | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). @@ -1411,8 +1411,8 @@ public async Task> ListByTimeNextPageAsync(string nex /// Lists report records by Time. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter, select | ge, le | | </br>| interval | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignInSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignInSettingsRestOperations.cs index deb05abf569f0..07a77976536d7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignInSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignInSettingsRestOperations.cs @@ -32,7 +32,7 @@ public SignInSettingsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -58,8 +58,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the SignInSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -90,8 +90,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the SignInSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -143,8 +143,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get Sign In Settings for the Portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -174,8 +174,8 @@ public async Task> GetAsync(strin } /// Get Sign In Settings for the Portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -231,8 +231,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update Sign-In settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. /// Update Sign-In settings. @@ -258,8 +258,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Update Sign-In settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. /// Update Sign-In settings. @@ -314,8 +314,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or Update Sign-In settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -346,8 +346,8 @@ public async Task> CreateOrUpdate } /// Create or Update Sign-In settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignUpSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignUpSettingsRestOperations.cs index 31a99a99d4715..7d69b41c045e9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignUpSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignUpSettingsRestOperations.cs @@ -32,7 +32,7 @@ public SignUpSettingsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -58,8 +58,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the SignUpSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -90,8 +90,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the SignUpSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -143,8 +143,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get Sign Up Settings for the Portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -174,8 +174,8 @@ public async Task> GetAsync(strin } /// Get Sign Up Settings for the Portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -231,8 +231,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update Sign-Up settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. /// Update Sign-Up settings. @@ -258,8 +258,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Update Sign-Up settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. /// Update Sign-Up settings. @@ -314,8 +314,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or Update Sign-Up settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -346,8 +346,8 @@ public async Task> CreateOrUpdate } /// Create or Update Sign-Up settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SubscriptionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SubscriptionRestOperations.cs index d909361329596..f836c82d83099 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SubscriptionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SubscriptionRestOperations.cs @@ -33,7 +33,7 @@ public SubscriptionRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,8 +71,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists all subscriptions of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. /// Number of records to return. @@ -103,8 +103,8 @@ public async Task> ListAsync(string subscriptio } /// Lists all subscriptions of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. /// Number of records to return. @@ -157,8 +157,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -191,8 +191,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -247,8 +247,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the specified Subscription entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -280,8 +280,8 @@ public async Task> GetAsync(string subscripti } /// Gets the specified Subscription entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -351,8 +351,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates the subscription of specified user to the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// Create parameters. @@ -392,8 +392,8 @@ public async Task> CreateOrUpdateAsync(string } /// Creates or updates the subscription of specified user to the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// Create parameters. @@ -468,8 +468,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of a subscription specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -508,8 +508,8 @@ public async Task> UpdateAsync(string subscri } /// Updates the details of a subscription specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -571,8 +571,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -599,8 +599,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -650,8 +650,8 @@ internal HttpMessage CreateRegeneratePrimaryKeyRequest(string subscriptionId, st } /// Regenerates primary key of existing subscription of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -676,8 +676,8 @@ public async Task RegeneratePrimaryKeyAsync(string subscriptionId, str } /// Regenerates primary key of existing subscription of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -725,8 +725,8 @@ internal HttpMessage CreateRegenerateSecondaryKeyRequest(string subscriptionId, } /// Regenerates secondary key of existing subscription of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -751,8 +751,8 @@ public async Task RegenerateSecondaryKeyAsync(string subscriptionId, s } /// Regenerates secondary key of existing subscription of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -800,8 +800,8 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// Gets the specified Subscription keys. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -831,8 +831,8 @@ public async Task> ListSecretsAsync(string su } /// Gets the specified Subscription keys. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -877,8 +877,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists all subscriptions of the API Management service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. /// Number of records to return. @@ -911,8 +911,8 @@ public async Task> ListNextPageAsync(string nex /// Lists all subscriptions of the API Management service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagResourceRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagResourceRestOperations.cs index 57fea4d0dce90..4170fef92515d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagResourceRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagResourceRestOperations.cs @@ -33,7 +33,7 @@ public TagResourceRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,8 +71,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of resources associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. @@ -103,8 +103,8 @@ public async Task> ListByServiceAsync(string sub } /// Lists a collection of resources associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. @@ -150,8 +150,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of resources associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. @@ -184,8 +184,8 @@ public async Task> ListByServiceNextPageAsync(st /// Lists a collection of resources associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagRestOperations.cs index d0e282f10f6d0..2f11b6086e34b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagRestOperations.cs @@ -33,7 +33,7 @@ public TagRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoi { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,8 +75,8 @@ internal HttpMessage CreateListByOperationRequest(string subscriptionId, string } /// Lists all Tags associated with the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -111,8 +111,8 @@ public async Task> ListByOperationAsync(string subscript } /// Lists all Tags associated with the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -173,8 +173,8 @@ internal HttpMessage CreateGetEntityStateByOperationRequest(string subscriptionI } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -211,8 +211,8 @@ public async Task> GetEntityStateByOperationAsync(string subscrip } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -275,8 +275,8 @@ internal HttpMessage CreateGetByOperationRequest(string subscriptionId, string r } /// Get tag associated with the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -312,8 +312,8 @@ public async Task> GetByOperationAsync(string subscrip } /// Get tag associated with the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -375,8 +375,8 @@ internal HttpMessage CreateAssignToOperationRequest(string subscriptionId, strin } /// Assign tag to the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -411,8 +411,8 @@ public async Task> AssignToOperationAsync(string subsc } /// Assign tag to the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -473,8 +473,8 @@ internal HttpMessage CreateDetachFromOperationRequest(string subscriptionId, str } /// Detach the tag from the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -504,8 +504,8 @@ public async Task DetachFromOperationAsync(string subscriptionId, stri } /// Detach the tag from the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -570,8 +570,8 @@ internal HttpMessage CreateListByApiRequest(string subscriptionId, string resour } /// Lists all Tags associated with the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -604,8 +604,8 @@ public async Task> ListByApiAsync(string subscriptionId, } /// Lists all Tags associated with the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -662,8 +662,8 @@ internal HttpMessage CreateGetEntityStateByApiRequest(string subscriptionId, str } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -698,8 +698,8 @@ public async Task> GetEntityStateByApiAsync(string subscriptionId } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -758,8 +758,8 @@ internal HttpMessage CreateGetByApiRequest(string subscriptionId, string resourc } /// Get tag associated with the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -793,8 +793,8 @@ public async Task> GetByApiAsync(string subscriptionId } /// Get tag associated with the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -852,8 +852,8 @@ internal HttpMessage CreateAssignToApiRequest(string subscriptionId, string reso } /// Assign tag to the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -886,8 +886,8 @@ public async Task> AssignToApiAsync(string subscriptio } /// Assign tag to the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -944,8 +944,8 @@ internal HttpMessage CreateDetachFromApiRequest(string subscriptionId, string re } /// Detach the tag from the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -973,8 +973,8 @@ public async Task DetachFromApiAsync(string subscriptionId, string res } /// Detach the tag from the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1037,8 +1037,8 @@ internal HttpMessage CreateListByProductRequest(string subscriptionId, string re } /// Lists all Tags associated with the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -1071,8 +1071,8 @@ public async Task> ListByProductAsync(string subscriptio } /// Lists all Tags associated with the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -1129,8 +1129,8 @@ internal HttpMessage CreateGetEntityStateByProductRequest(string subscriptionId, } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1165,8 +1165,8 @@ public async Task> GetEntityStateByProductAsync(string subscripti } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1225,8 +1225,8 @@ internal HttpMessage CreateGetByProductRequest(string subscriptionId, string res } /// Get tag associated with the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1260,8 +1260,8 @@ public async Task> GetByProductAsync(string subscripti } /// Get tag associated with the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1319,8 +1319,8 @@ internal HttpMessage CreateAssignToProductRequest(string subscriptionId, string } /// Assign tag to the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1353,8 +1353,8 @@ public async Task> AssignToProductAsync(string subscri } /// Assign tag to the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1411,8 +1411,8 @@ internal HttpMessage CreateDetachFromProductRequest(string subscriptionId, strin } /// Detach the tag from the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1440,8 +1440,8 @@ public async Task DetachFromProductAsync(string subscriptionId, string } /// Detach the tag from the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1506,8 +1506,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of tags defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -1539,8 +1539,8 @@ public async Task> ListByServiceAsync(string subscriptio } /// Lists a collection of tags defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -1594,8 +1594,8 @@ internal HttpMessage CreateGetEntityStateRequest(string subscriptionId, string r } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -1628,8 +1628,8 @@ public async Task> GetEntityStateAsync(string subscriptionId, str } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -1684,8 +1684,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -1717,8 +1717,8 @@ public async Task> GetAsync(string subscriptionId, str } /// Gets the details of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -1780,8 +1780,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a tag. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// Create parameters. @@ -1815,8 +1815,8 @@ public async Task> CreateOrUpdateAsync(string subscrip } /// Creates a tag. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// Create parameters. @@ -1877,8 +1877,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -1911,8 +1911,8 @@ public async Task> UpdateAsync(string subscriptionId, } /// Updates the details of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -1968,8 +1968,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific tag of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -1996,8 +1996,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific tag of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -2039,8 +2039,8 @@ internal HttpMessage CreateListByOperationNextPageRequest(string nextLink, strin /// Lists all Tags associated with the Operation. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -2077,8 +2077,8 @@ public async Task> ListByOperationNextPageAsync(string n /// Lists all Tags associated with the Operation. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -2129,8 +2129,8 @@ internal HttpMessage CreateListByApiNextPageRequest(string nextLink, string subs /// Lists all Tags associated with the API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -2165,8 +2165,8 @@ public async Task> ListByApiNextPageAsync(string nextLin /// Lists all Tags associated with the API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -2215,8 +2215,8 @@ internal HttpMessage CreateListByProductNextPageRequest(string nextLink, string /// Lists all Tags associated with the Product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -2251,8 +2251,8 @@ public async Task> ListByProductNextPageAsync(string nex /// Lists all Tags associated with the Product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -2301,8 +2301,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of tags defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -2336,8 +2336,8 @@ public async Task> ListByServiceNextPageAsync(string nex /// Lists a collection of tags defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessGitRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessGitRestOperations.cs index 4b9d9b541f042..48a1ba38072ee 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessGitRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessGitRestOperations.cs @@ -32,7 +32,7 @@ public TenantAccessGitRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -60,8 +60,8 @@ internal HttpMessage CreateRegeneratePrimaryKeyRequest(string subscriptionId, st } /// Regenerate primary access key for GIT. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -85,8 +85,8 @@ public async Task RegeneratePrimaryKeyAsync(string subscriptionId, str } /// Regenerate primary access key for GIT. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -133,8 +133,8 @@ internal HttpMessage CreateRegenerateSecondaryKeyRequest(string subscriptionId, } /// Regenerate secondary access key for GIT. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -158,8 +158,8 @@ public async Task RegenerateSecondaryKeyAsync(string subscriptionId, s } /// Regenerate secondary access key for GIT. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessRestOperations.cs index 2975ded825494..2730b715c7990 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessRestOperations.cs @@ -33,7 +33,7 @@ public TenantAccessRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -63,8 +63,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Returns list of access infos - for Git and Management endpoints. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. @@ -93,8 +93,8 @@ public async Task> ListByServiceAsync(stri } /// Returns list of access infos - for Git and Management endpoints. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. @@ -145,8 +145,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Tenant access metadata. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -178,8 +178,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Tenant access metadata. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -233,8 +233,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get tenant access information details without secrets. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -265,8 +265,8 @@ public async Task> GetAsync(string subscriptionId } /// Get tenant access information details without secrets. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -324,8 +324,8 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Update tenant access information details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -357,8 +357,8 @@ public async Task> CreateAsync(string subscriptio } /// Update tenant access information details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -417,8 +417,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update tenant access information details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -450,8 +450,8 @@ public async Task> UpdateAsync(string subscriptio } /// Update tenant access information details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -506,8 +506,8 @@ internal HttpMessage CreateRegeneratePrimaryKeyRequest(string subscriptionId, st } /// Regenerate primary access key. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -531,8 +531,8 @@ public async Task RegeneratePrimaryKeyAsync(string subscriptionId, str } /// Regenerate primary access key. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -579,8 +579,8 @@ internal HttpMessage CreateRegenerateSecondaryKeyRequest(string subscriptionId, } /// Regenerate secondary access key. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -604,8 +604,8 @@ public async Task RegenerateSecondaryKeyAsync(string subscriptionId, s } /// Regenerate secondary access key. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -652,8 +652,8 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// Get tenant access information details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -682,8 +682,8 @@ public async Task> ListSecretsAsync(str } /// Get tenant access information details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -727,8 +727,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Returns list of access infos - for Git and Management endpoints. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. @@ -759,8 +759,8 @@ public async Task> ListByServiceNextPageAs /// Returns list of access infos - for Git and Management endpoints. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantConfigurationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantConfigurationRestOperations.cs index c6efc569762bc..ef75209d9604e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantConfigurationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantConfigurationRestOperations.cs @@ -33,7 +33,7 @@ public TenantConfigurationRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -65,8 +65,8 @@ internal HttpMessage CreateDeployRequest(string subscriptionId, string resourceG } /// This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// Deploy Configuration parameters. @@ -93,8 +93,8 @@ public async Task DeployAsync(string subscriptionId, string resourceGr } /// This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// Deploy Configuration parameters. @@ -148,8 +148,8 @@ internal HttpMessage CreateSaveRequest(string subscriptionId, string resourceGro } /// This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// Save Configuration parameters. @@ -176,8 +176,8 @@ public async Task SaveAsync(string subscriptionId, string resourceGrou } /// This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// Save Configuration parameters. @@ -231,8 +231,8 @@ internal HttpMessage CreateValidateRequest(string subscriptionId, string resourc } /// This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// Validate Configuration parameters. @@ -259,8 +259,8 @@ public async Task ValidateAsync(string subscriptionId, string resource } /// This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// Validate Configuration parameters. @@ -310,8 +310,8 @@ internal HttpMessage CreateGetSyncStateRequest(string subscriptionId, string res } /// Gets the status of the most recent synchronization between the configuration database and the Git repository. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// The cancellation token to use. @@ -340,8 +340,8 @@ public async Task> GetSyncStateAs } /// Gets the status of the most recent synchronization between the configuration database and the Git repository. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantSettingsRestOperations.cs index 716f1a88f70d6..8b7c219c23d25 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantSettingsRestOperations.cs @@ -33,7 +33,7 @@ public TenantSettingsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -63,8 +63,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Public settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. @@ -93,8 +93,8 @@ public async Task> ListByServiceAsync(string } /// Public settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. @@ -145,8 +145,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get tenant settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the settings. /// The cancellation token to use. @@ -177,8 +177,8 @@ public async Task> GetAsync(string subs } /// Get tenant settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the settings. /// The cancellation token to use. @@ -224,8 +224,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Public settings. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. @@ -256,8 +256,8 @@ public async Task> ListByServiceNextPageAsync /// Public settings. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserConfirmationPasswordRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserConfirmationPasswordRestOperations.cs index 4f06d21ceedbf..492bf1ec30d0d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserConfirmationPasswordRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserConfirmationPasswordRestOperations.cs @@ -32,7 +32,7 @@ public UserConfirmationPasswordRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -64,8 +64,8 @@ internal HttpMessage CreateSendRequest(string subscriptionId, string resourceGro } /// Sends confirmation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Determines the type of application which send the create user request. Default is legacy publisher portal. @@ -91,8 +91,8 @@ public async Task SendAsync(string subscriptionId, string resourceGrou } /// Sends confirmation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Determines the type of application which send the create user request. Default is legacy publisher portal. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserGroupRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserGroupRestOperations.cs index 5ac160d409082..080c6fc85073b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserGroupRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserGroupRestOperations.cs @@ -33,7 +33,7 @@ public UserGroupRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists all user groups. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -107,8 +107,8 @@ public async Task> ListAsync(string subscriptionId, st } /// Lists all user groups. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -156,8 +156,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists all user groups. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -192,8 +192,8 @@ public async Task> ListNextPageAsync(string nextLink, /// Lists all user groups. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserIdentitiesRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserIdentitiesRestOperations.cs index 5aa72d7280fe8..715d5f5f54a57 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserIdentitiesRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserIdentitiesRestOperations.cs @@ -33,7 +33,7 @@ public UserIdentitiesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -61,8 +61,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// List of all user identities. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -92,8 +92,8 @@ public async Task> ListAsync(string subscriptio } /// List of all user identities. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -138,8 +138,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// List of all user identities. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -171,8 +171,8 @@ public async Task> ListNextPageAsync(string nex /// List of all user identities. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserRestOperations.cs index 00f75796cfba1..fc71c886f79ca 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserRestOperations.cs @@ -33,7 +33,7 @@ public UserRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,8 +75,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of registered users in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -108,8 +108,8 @@ public async Task> ListByServiceAsync(string subscripti } /// Lists a collection of registered users in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -163,8 +163,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the user specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -197,8 +197,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the user specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -253,8 +253,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the user specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -286,8 +286,8 @@ public async Task> GetAsync(string subscriptionId, st } /// Gets the details of the user specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -353,8 +353,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates a user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -389,8 +389,8 @@ public async Task> CreateOrUpdateAsync(string subscri } /// Creates or Updates a user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -452,8 +452,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the user specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -486,8 +486,8 @@ public async Task> UpdateAsync(string subscriptionId, } /// Updates the details of the user specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -555,8 +555,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -586,8 +586,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -640,8 +640,8 @@ internal HttpMessage CreateGenerateSsoUriRequest(string subscriptionId, string r } /// Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -671,8 +671,8 @@ public async Task> GenerateSsoUriAsync(string sub } /// Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -729,8 +729,8 @@ internal HttpMessage CreateGetSharedAccessTokenRequest(string subscriptionId, st } /// Gets the Shared Access Authorization Token for the User. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Create Authorization Token parameters. @@ -762,8 +762,8 @@ public async Task> GetSharedAccessTokenAsync(string su } /// Gets the Shared Access Authorization Token for the User. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Create Authorization Token parameters. @@ -810,8 +810,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of registered users in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -845,8 +845,8 @@ public async Task> ListByServiceNextPageAsync(string ne /// Lists a collection of registered users in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| groups | expand | | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserSubscriptionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserSubscriptionRestOperations.cs index d8a7946a3c63c..c2897d8a75092 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserSubscriptionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserSubscriptionRestOperations.cs @@ -33,7 +33,7 @@ public UserSubscriptionRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists the collection of subscriptions of the specified user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>|name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -107,8 +107,8 @@ public async Task> ListAsync(string subscriptio } /// Lists the collection of subscriptions of the specified user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>|name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -165,8 +165,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the specified Subscription entity associated with a particular user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. @@ -200,8 +200,8 @@ public async Task> GetAsync(string subscripti } /// Gets the specified Subscription entity associated with a particular user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. @@ -250,8 +250,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists the collection of subscriptions of the specified user. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>|name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -286,8 +286,8 @@ public async Task> ListNextPageAsync(string nex /// Lists the collection of subscriptions of the specified user. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>|name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyCollection.cs new file mode 100644 index 0000000000000..ea469d3bf7a8d --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyCollection.cs @@ -0,0 +1,327 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetServiceApiResolverPolicies method from an instance of . + /// + public partial class ServiceApiResolverPolicyCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics; + private readonly GraphQLApiResolverPolicyRestOperations _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient; + + /// Initializes a new instance of the class for mocking. + protected ServiceApiResolverPolicyCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ServiceApiResolverPolicyCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ServiceApiResolverPolicyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ServiceApiResolverPolicyResource.ResourceType, out string serviceApiResolverPolicyGraphQLApiResolverPolicyApiVersion); + _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient = new GraphQLApiResolverPolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceApiResolverPolicyGraphQLApiResolverPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResolverContractResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResolverContractResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates policy configuration for the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The identifier of the Policy. + /// The policy contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, PolicyName policyId, PolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceApiResolverPolicyResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates policy configuration for the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The identifier of the Policy. + /// The policy contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, PolicyName policyId, PolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, data, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceApiResolverPolicyResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + public virtual async Task> GetAsync(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.Get"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, format, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceApiResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + public virtual Response Get(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.Get"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, format, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceApiResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the list of policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_ListByResolver + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateListByResolverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateListByResolverNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ServiceApiResolverPolicyResource(Client, PolicyContractData.DeserializePolicyContractData(e)), _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics, Pipeline, "ServiceApiResolverPolicyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Get the list of policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_ListByResolver + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateListByResolverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateListByResolverNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ServiceApiResolverPolicyResource(Client, PolicyContractData.DeserializePolicyContractData(e)), _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics, Pipeline, "ServiceApiResolverPolicyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + public virtual async Task> ExistsAsync(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.Exists"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, format, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + public virtual Response Exists(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.Exists"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, format, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.cs new file mode 100644 index 0000000000000..e1c9e0179b663 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.cs @@ -0,0 +1,364 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a ServiceApiResolverPolicy along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetServiceApiResolverPolicyResource method. + /// Otherwise you can get one from its parent resource using the GetServiceApiResolverPolicy method. + /// + public partial class ServiceApiResolverPolicyResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics; + private readonly GraphQLApiResolverPolicyRestOperations _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient; + private readonly PolicyContractData _data; + + /// Initializes a new instance of the class for mocking. + protected ServiceApiResolverPolicyResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ServiceApiResolverPolicyResource(ArmClient client, PolicyContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ServiceApiResolverPolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string serviceApiResolverPolicyGraphQLApiResolverPolicyApiVersion); + _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient = new GraphQLApiResolverPolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceApiResolverPolicyGraphQLApiResolverPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/apis/resolvers/policies"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual PolicyContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get the policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// + /// Policy Export Format. + /// The cancellation token to use. + public virtual async Task> GetAsync(PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.Get"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, format, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceApiResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// + /// Policy Export Format. + /// The cancellation token to use. + public virtual Response Get(PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.Get"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, format, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceApiResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the policy configuration at the GraphQL Api Resolver. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.Delete"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the policy configuration at the GraphQL Api Resolver. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.Delete"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates policy configuration for the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The policy contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.Update"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceApiResolverPolicyResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates policy configuration for the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The policy contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, PolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.Update"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceApiResolverPolicyResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_GetEntityTag + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_GetEntityTag + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.GetEntityTag"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.cs new file mode 100644 index 0000000000000..27bb3b7164d30 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.cs @@ -0,0 +1,432 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a ServiceApiWiki along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetServiceApiWikiResource method. + /// Otherwise you can get one from its parent resource using the GetServiceApiWiki method. + /// + public partial class ServiceApiWikiResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _serviceApiWikiApiWikiClientDiagnostics; + private readonly ApiWikiRestOperations _serviceApiWikiApiWikiRestClient; + private readonly WikiContractData _data; + + /// Initializes a new instance of the class for mocking. + protected ServiceApiWikiResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ServiceApiWikiResource(ArmClient client, WikiContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ServiceApiWikiResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceApiWikiApiWikiClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string serviceApiWikiApiWikiApiVersion); + _serviceApiWikiApiWikiRestClient = new ApiWikiRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceApiWikiApiWikiApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/apis/wikis"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WikiContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the Wiki for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.Get"); + scope.Start(); + try + { + var response = await _serviceApiWikiApiWikiRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceApiWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Wiki for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.Get"); + scope.Start(); + try + { + var response = _serviceApiWikiApiWikiRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceApiWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Wiki from an API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.Delete"); + scope.Start(); + try + { + var response = await _serviceApiWikiApiWikiRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Wiki from an API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.Delete"); + scope.Start(); + try + { + var response = _serviceApiWikiApiWikiRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Wiki for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_Update + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.Update"); + scope.Start(); + try + { + var response = await _serviceApiWikiApiWikiRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, wikiUpdateContract, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ServiceApiWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Wiki for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_Update + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.Update"); + scope.Start(); + try + { + var response = _serviceApiWikiApiWikiRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, wikiUpdateContract, cancellationToken); + return Response.FromValue(new ServiceApiWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a new Wiki for an API or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _serviceApiWikiApiWikiRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceApiWikiResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a new Wiki for an API or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = _serviceApiWikiApiWikiRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceApiWikiResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_GetEntityTag + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _serviceApiWikiApiWikiRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_GetEntityTag + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.GetEntityTag"); + scope.Start(); + try + { + var response = _serviceApiWikiApiWikiRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.cs new file mode 100644 index 0000000000000..5ded79fab87b5 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.cs @@ -0,0 +1,432 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a ServiceProductWiki along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetServiceProductWikiResource method. + /// Otherwise you can get one from its parent resource using the GetServiceProductWiki method. + /// + public partial class ServiceProductWikiResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string productId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _serviceProductWikiProductWikiClientDiagnostics; + private readonly ProductWikiRestOperations _serviceProductWikiProductWikiRestClient; + private readonly WikiContractData _data; + + /// Initializes a new instance of the class for mocking. + protected ServiceProductWikiResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ServiceProductWikiResource(ArmClient client, WikiContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ServiceProductWikiResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceProductWikiProductWikiClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string serviceProductWikiProductWikiApiVersion); + _serviceProductWikiProductWikiRestClient = new ProductWikiRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceProductWikiProductWikiApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/products/wikis"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WikiContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the Wiki for a Product specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.Get"); + scope.Start(); + try + { + var response = await _serviceProductWikiProductWikiRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceProductWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Wiki for a Product specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.Get"); + scope.Start(); + try + { + var response = _serviceProductWikiProductWikiRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceProductWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Wiki from a Product. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.Delete"); + scope.Start(); + try + { + var response = await _serviceProductWikiProductWikiRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Wiki from a Product. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.Delete"); + scope.Start(); + try + { + var response = _serviceProductWikiProductWikiRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Wiki for a Product specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_Update + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.Update"); + scope.Start(); + try + { + var response = await _serviceProductWikiProductWikiRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, wikiUpdateContract, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ServiceProductWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Wiki for a Product specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_Update + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.Update"); + scope.Start(); + try + { + var response = _serviceProductWikiProductWikiRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, wikiUpdateContract, cancellationToken); + return Response.FromValue(new ServiceProductWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a new Wiki for a Product or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _serviceProductWikiProductWikiRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceProductWikiResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a new Wiki for a Product or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = _serviceProductWikiProductWikiRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceProductWikiResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_GetEntityTag + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _serviceProductWikiProductWikiRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_GetEntityTag + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.GetEntityTag"); + scope.Start(); + try + { + var response = _serviceProductWikiProductWikiRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WikiContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WikiContractData.cs new file mode 100644 index 0000000000000..33883aed06266 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WikiContractData.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the WikiContract data model. + /// Wiki properties + /// + public partial class WikiContractData : ResourceData + { + /// Initializes a new instance of WikiContractData. + public WikiContractData() + { + Documents = new ChangeTrackingList(); + } + + /// Initializes a new instance of WikiContractData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Collection wiki documents included into this wiki. + internal WikiContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IList documents) : base(id, name, resourceType, systemData) + { + Documents = documents; + } + + /// Collection wiki documents included into this wiki. + public IList Documents { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/autorest.md b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/autorest.md index 68d79edfef0ee..80b89ee13e818 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/autorest.md +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/autorest.md @@ -9,7 +9,7 @@ generate-model-factory: false csharp: true library-name: ApiManagement namespace: Azure.ResourceManager.ApiManagement -require: https://github.com/Azure/azure-rest-api-specs/blob/2f28b5026a4b44adefd0237087acb0c48cfe31a6/specification/apimanagement/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/apimanagement/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true