/// <summary> /// Gets the details of the API specified by its identifier in the format /// specified to the Storage Blob with SAS Key valid for 5 minutes. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='serviceName'> /// The name of the API Management service. /// </param> /// <param name='apiId'> /// 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. /// </param> /// <param name='format'> /// Format in which to export the Api Details to the Storage Blob with Sas Key /// valid for 5 minutes. Possible values include: 'Swagger', 'Wsdl', 'Wadl', /// 'Openapi', 'OpenapiJson' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ApiExportResult> GetAsync(this IApiExportOperations operations, string resourceGroupName, string serviceName, string apiId, string format, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, format, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the details of the API specified by its identifier in the format /// specified to the Storage Blob with SAS Key valid for 5 minutes. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='serviceName'> /// The name of the API Management service. /// </param> /// <param name='apiId'> /// 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. /// </param> /// <param name='format'> /// Format in which to export the Api Details to the Storage Blob with Sas Key /// valid for 5 minutes. Possible values include: 'Swagger', 'Wsdl', 'Wadl', /// 'Openapi', 'OpenapiJson' /// </param> public static ApiExportResult Get(this IApiExportOperations operations, string resourceGroupName, string serviceName, string apiId, string format) { return(operations.GetAsync(resourceGroupName, serviceName, apiId, format).GetAwaiter().GetResult()); }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Policy = new PolicyOperations(this); PolicySnippets = new PolicySnippetsOperations(this); Regions = new RegionsOperations(this); Api = new ApiOperations(this); ApiRevisions = new ApiRevisionsOperations(this); ApiRelease = new ApiReleaseOperations(this); ApiOperation = new ApiOperationOperations(this); ApiOperationPolicy = new ApiOperationPolicyOperations(this); ApiProduct = new ApiProductOperations(this); ApiPolicy = new ApiPolicyOperations(this); ApiSchema = new ApiSchemaOperations(this); ApiDiagnostic = new ApiDiagnosticOperations(this); ApiDiagnosticLogger = new ApiDiagnosticLoggerOperations(this); ApiIssue = new ApiIssueOperations(this); ApiIssueComment = new ApiIssueCommentOperations(this); ApiIssueAttachment = new ApiIssueAttachmentOperations(this); AuthorizationServer = new AuthorizationServerOperations(this); Backend = new BackendOperations(this); Certificate = new CertificateOperations(this); ApiManagementOperations = new ApiManagementOperations(this); ApiManagementServiceSkus = new ApiManagementServiceSkusOperations(this); ApiManagementService = new ApiManagementServiceOperations(this); Diagnostic = new DiagnosticOperations(this); DiagnosticLogger = new DiagnosticLoggerOperations(this); EmailTemplate = new EmailTemplateOperations(this); Group = new GroupOperations(this); GroupUser = new GroupUserOperations(this); IdentityProvider = new IdentityProviderOperations(this); Logger = new LoggerOperations(this); Notification = new NotificationOperations(this); NotificationRecipientUser = new NotificationRecipientUserOperations(this); NotificationRecipientEmail = new NotificationRecipientEmailOperations(this); NetworkStatus = new NetworkStatusOperations(this); OpenIdConnectProvider = new OpenIdConnectProviderOperations(this); SignInSettings = new SignInSettingsOperations(this); SignUpSettings = new SignUpSettingsOperations(this); DelegationSettings = new DelegationSettingsOperations(this); Product = new ProductOperations(this); ProductApi = new ProductApiOperations(this); ProductGroup = new ProductGroupOperations(this); ProductSubscriptions = new ProductSubscriptionsOperations(this); ProductPolicy = new ProductPolicyOperations(this); Property = new PropertyOperations(this); QuotaByCounterKeys = new QuotaByCounterKeysOperations(this); QuotaByPeriodKeys = new QuotaByPeriodKeysOperations(this); Reports = new ReportsOperations(this); Subscription = new SubscriptionOperations(this); TagResource = new TagResourceOperations(this); Tag = new TagOperations(this); TagDescription = new TagDescriptionOperations(this); Operation = new OperationOperations(this); TenantAccess = new TenantAccessOperations(this); TenantAccessGit = new TenantAccessGitOperations(this); TenantConfiguration = new TenantConfigurationOperations(this); User = new UserOperations(this); UserGroup = new UserGroupOperations(this); UserSubscription = new UserSubscriptionOperations(this); UserIdentities = new UserIdentitiesOperations(this); ApiVersionSet = new ApiVersionSetOperations(this); ApiExport = new ApiExportOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2018-01-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; SerializationSettings = new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; SerializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }