diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web.rb old mode 100755 new mode 100644 index 41051e2de4..f2a0603e02 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web.rb @@ -33,131 +33,140 @@ module Azure::ARM::Web autoload :WebSiteManagementClient, 'generated/azure_mgmt_web/web_site_management_client.rb' module Models - autoload :ResourceNameAvailabilityRequest, 'generated/azure_mgmt_web/models/resource_name_availability_request.rb' + autoload :ConnStringValueTypePair, 'generated/azure_mgmt_web/models/conn_string_value_type_pair.rb' autoload :AppServiceCertificate, 'generated/azure_mgmt_web/models/app_service_certificate.rb' - autoload :SkuInfos, 'generated/azure_mgmt_web/models/sku_infos.rb' - autoload :AppServiceCertificateCollection, 'generated/azure_mgmt_web/models/app_service_certificate_collection.rb' - autoload :ResourceMetricAvailability, 'generated/azure_mgmt_web/models/resource_metric_availability.rb' autoload :GeoRegionCollection, 'generated/azure_mgmt_web/models/geo_region_collection.rb' - autoload :AppServiceCertificateOrderCollection, 'generated/azure_mgmt_web/models/app_service_certificate_order_collection.rb' autoload :SkuCapacity, 'generated/azure_mgmt_web/models/sku_capacity.rb' - autoload :SiteCloneabilityCriterion, 'generated/azure_mgmt_web/models/site_cloneability_criterion.rb' + autoload :CertificateDetails, 'generated/azure_mgmt_web/models/certificate_details.rb' autoload :GlobalCsmSkuDescription, 'generated/azure_mgmt_web/models/global_csm_sku_description.rb' - autoload :VirtualIPMapping, 'generated/azure_mgmt_web/models/virtual_ipmapping.rb' - autoload :ResourceMetric, 'generated/azure_mgmt_web/models/resource_metric.rb' + autoload :AppServiceCertificateOrderCollection, 'generated/azure_mgmt_web/models/app_service_certificate_order_collection.rb' + autoload :SiteConfigResourceCollection, 'generated/azure_mgmt_web/models/site_config_resource_collection.rb' + autoload :CsmMoveResourceEnvelope, 'generated/azure_mgmt_web/models/csm_move_resource_envelope.rb' + autoload :ResourceMetricValue, 'generated/azure_mgmt_web/models/resource_metric_value.rb' + autoload :ProxyOnlyResource, 'generated/azure_mgmt_web/models/proxy_only_resource.rb' + autoload :AppServiceCertificateCollection, 'generated/azure_mgmt_web/models/app_service_certificate_collection.rb' + autoload :WebAppCollection, 'generated/azure_mgmt_web/models/web_app_collection.rb' autoload :Resource, 'generated/azure_mgmt_web/models/resource.rb' + autoload :SiteSeal, 'generated/azure_mgmt_web/models/site_seal.rb' + autoload :ResourceMetricName, 'generated/azure_mgmt_web/models/resource_metric_name.rb' + autoload :Address, 'generated/azure_mgmt_web/models/address.rb' + autoload :AddressResponse, 'generated/azure_mgmt_web/models/address_response.rb' + autoload :HostName, 'generated/azure_mgmt_web/models/host_name.rb' + autoload :ResourceMetricProperty, 'generated/azure_mgmt_web/models/resource_metric_property.rb' + autoload :WebAppInstanceCollection, 'generated/azure_mgmt_web/models/web_app_instance_collection.rb' autoload :PremierAddOnOfferCollection, 'generated/azure_mgmt_web/models/premier_add_on_offer_collection.rb' - autoload :SiteSealRequest, 'generated/azure_mgmt_web/models/site_seal_request.rb' + autoload :DomainCollection, 'generated/azure_mgmt_web/models/domain_collection.rb' autoload :ResourceNameAvailability, 'generated/azure_mgmt_web/models/resource_name_availability.rb' - autoload :Contact, 'generated/azure_mgmt_web/models/contact.rb' - autoload :ResourceMetricValue, 'generated/azure_mgmt_web/models/resource_metric_value.rb' - autoload :DomainPurchaseConsent, 'generated/azure_mgmt_web/models/domain_purchase_consent.rb' - autoload :CertificateDetails, 'generated/azure_mgmt_web/models/certificate_details.rb' - autoload :DomainAvailablilityCheckResult, 'generated/azure_mgmt_web/models/domain_availablility_check_result.rb' + autoload :ResourceMetricDefinitionCollection, 'generated/azure_mgmt_web/models/resource_metric_definition_collection.rb' + autoload :ResourceNameAvailabilityRequest, 'generated/azure_mgmt_web/models/resource_name_availability_request.rb' + autoload :DomainRecommendationSearchParameters, 'generated/azure_mgmt_web/models/domain_recommendation_search_parameters.rb' + autoload :SkuInfos, 'generated/azure_mgmt_web/models/sku_infos.rb' + autoload :TldLegalAgreement, 'generated/azure_mgmt_web/models/tld_legal_agreement.rb' autoload :SlotDifferenceCollection, 'generated/azure_mgmt_web/models/slot_difference_collection.rb' - autoload :DomainControlCenterSsoRequest, 'generated/azure_mgmt_web/models/domain_control_center_sso_request.rb' + autoload :VirtualIPMapping, 'generated/azure_mgmt_web/models/virtual_ipmapping.rb' autoload :SourceControlCollection, 'generated/azure_mgmt_web/models/source_control_collection.rb' - autoload :DomainOwnershipIdentifierCollection, 'generated/azure_mgmt_web/models/domain_ownership_identifier_collection.rb' - autoload :SnapshotCollection, 'generated/azure_mgmt_web/models/snapshot_collection.rb' - autoload :NameIdentifierCollection, 'generated/azure_mgmt_web/models/name_identifier_collection.rb' + autoload :TopLevelDomainCollection, 'generated/azure_mgmt_web/models/top_level_domain_collection.rb' + autoload :SiteCloneability, 'generated/azure_mgmt_web/models/site_cloneability.rb' + autoload :ResourceMetricCollection, 'generated/azure_mgmt_web/models/resource_metric_collection.rb' autoload :ValidateRequest, 'generated/azure_mgmt_web/models/validate_request.rb' - autoload :TldLegalAgreementCollection, 'generated/azure_mgmt_web/models/tld_legal_agreement_collection.rb' + autoload :ApiDefinitionInfo, 'generated/azure_mgmt_web/models/api_definition_info.rb' autoload :ValidateResponseError, 'generated/azure_mgmt_web/models/validate_response_error.rb' - autoload :TopLevelDomainAgreementOption, 'generated/azure_mgmt_web/models/top_level_domain_agreement_option.rb' + autoload :AutoHealActions, 'generated/azure_mgmt_web/models/auto_heal_actions.rb' autoload :ValidateResponse, 'generated/azure_mgmt_web/models/validate_response.rb' - autoload :HostingEnvironmentProfile, 'generated/azure_mgmt_web/models/hosting_environment_profile.rb' + autoload :StatusCodesBasedTrigger, 'generated/azure_mgmt_web/models/status_codes_based_trigger.rb' autoload :FileSystemApplicationLogsConfig, 'generated/azure_mgmt_web/models/file_system_application_logs_config.rb' - autoload :CertificateCollection, 'generated/azure_mgmt_web/models/certificate_collection.rb' + autoload :AutoHealTriggers, 'generated/azure_mgmt_web/models/auto_heal_triggers.rb' autoload :AzureTableStorageApplicationLogsConfig, 'generated/azure_mgmt_web/models/azure_table_storage_application_logs_config.rb' - autoload :AutoHealCustomAction, 'generated/azure_mgmt_web/models/auto_heal_custom_action.rb' + autoload :CloningInfo, 'generated/azure_mgmt_web/models/cloning_info.rb' autoload :AzureBlobStorageApplicationLogsConfig, 'generated/azure_mgmt_web/models/azure_blob_storage_application_logs_config.rb' - autoload :RequestsBasedTrigger, 'generated/azure_mgmt_web/models/requests_based_trigger.rb' + autoload :CorsSettings, 'generated/azure_mgmt_web/models/cors_settings.rb' autoload :ApplicationLogsConfig, 'generated/azure_mgmt_web/models/application_logs_config.rb' - autoload :SlowRequestsBasedTrigger, 'generated/azure_mgmt_web/models/slow_requests_based_trigger.rb' + autoload :NameValuePair, 'generated/azure_mgmt_web/models/name_value_pair.rb' autoload :AzureBlobStorageHttpLogsConfig, 'generated/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb' - autoload :AutoHealRules, 'generated/azure_mgmt_web/models/auto_heal_rules.rb' + autoload :HandlerMapping, 'generated/azure_mgmt_web/models/handler_mapping.rb' autoload :DatabaseBackupSetting, 'generated/azure_mgmt_web/models/database_backup_setting.rb' - autoload :ConnStringInfo, 'generated/azure_mgmt_web/models/conn_string_info.rb' - autoload :WebAppCollection, 'generated/azure_mgmt_web/models/web_app_collection.rb' - autoload :HostNameSslState, 'generated/azure_mgmt_web/models/host_name_ssl_state.rb' + autoload :VirtualApplication, 'generated/azure_mgmt_web/models/virtual_application.rb' + autoload :SiteCloneabilityCriterion, 'generated/azure_mgmt_web/models/site_cloneability_criterion.rb' + autoload :Experiments, 'generated/azure_mgmt_web/models/experiments.rb' autoload :BackupItemCollection, 'generated/azure_mgmt_web/models/backup_item_collection.rb' - autoload :SiteMachineKey, 'generated/azure_mgmt_web/models/site_machine_key.rb' + autoload :ResourceMetricAvailability, 'generated/azure_mgmt_web/models/resource_metric_availability.rb' autoload :BackupSchedule, 'generated/azure_mgmt_web/models/backup_schedule.rb' - autoload :VirtualDirectory, 'generated/azure_mgmt_web/models/virtual_directory.rb' - autoload :SiteConfigResourceCollection, 'generated/azure_mgmt_web/models/site_config_resource_collection.rb' - autoload :RampUpRule, 'generated/azure_mgmt_web/models/ramp_up_rule.rb' - autoload :ConnStringValueTypePair, 'generated/azure_mgmt_web/models/conn_string_value_type_pair.rb' - autoload :SiteLimits, 'generated/azure_mgmt_web/models/site_limits.rb' - autoload :IpSecurityRestriction, 'generated/azure_mgmt_web/models/ip_security_restriction.rb' - autoload :CsmPublishingProfileOptions, 'generated/azure_mgmt_web/models/csm_publishing_profile_options.rb' - autoload :SlotSwapStatus, 'generated/azure_mgmt_web/models/slot_swap_status.rb' - autoload :CsmSiteRecoveryEntity, 'generated/azure_mgmt_web/models/csm_site_recovery_entity.rb' + autoload :SiteConfig, 'generated/azure_mgmt_web/models/site_config.rb' + autoload :SnapshotCollection, 'generated/azure_mgmt_web/models/snapshot_collection.rb' + autoload :ResourceMetric, 'generated/azure_mgmt_web/models/resource_metric.rb' autoload :DeletedWebAppCollection, 'generated/azure_mgmt_web/models/deleted_web_app_collection.rb' + autoload :PublicCertificateCollection, 'generated/azure_mgmt_web/models/public_certificate_collection.rb' + autoload :Dimension, 'generated/azure_mgmt_web/models/dimension.rb' + autoload :MetricSpecification, 'generated/azure_mgmt_web/models/metric_specification.rb' + autoload :CsmPublishingProfileOptions, 'generated/azure_mgmt_web/models/csm_publishing_profile_options.rb' + autoload :CsmOperationDescriptionProperties, 'generated/azure_mgmt_web/models/csm_operation_description_properties.rb' autoload :CsmSlotEntity, 'generated/azure_mgmt_web/models/csm_slot_entity.rb' - autoload :RecommendationRule, 'generated/azure_mgmt_web/models/recommendation_rule.rb' + autoload :CsmOperationCollection, 'generated/azure_mgmt_web/models/csm_operation_collection.rb' autoload :LocalizableString, 'generated/azure_mgmt_web/models/localizable_string.rb' - autoload :CsmMoveResourceEnvelope, 'generated/azure_mgmt_web/models/csm_move_resource_envelope.rb' + autoload :RecommendationRule, 'generated/azure_mgmt_web/models/recommendation_rule.rb' autoload :CsmUsageQuota, 'generated/azure_mgmt_web/models/csm_usage_quota.rb' - autoload :SiteCloneability, 'generated/azure_mgmt_web/models/site_cloneability.rb' + autoload :NameIdentifier, 'generated/azure_mgmt_web/models/name_identifier.rb' autoload :CsmUsageQuotaCollection, 'generated/azure_mgmt_web/models/csm_usage_quota_collection.rb' - autoload :AddressResponse, 'generated/azure_mgmt_web/models/address_response.rb' + autoload :SiteSealRequest, 'generated/azure_mgmt_web/models/site_seal_request.rb' autoload :ErrorEntity, 'generated/azure_mgmt_web/models/error_entity.rb' - autoload :Address, 'generated/azure_mgmt_web/models/address.rb' + autoload :DomainPurchaseConsent, 'generated/azure_mgmt_web/models/domain_purchase_consent.rb' autoload :ResourceCollection, 'generated/azure_mgmt_web/models/resource_collection.rb' - autoload :VirtualNetworkProfile, 'generated/azure_mgmt_web/models/virtual_network_profile.rb' + autoload :DomainControlCenterSsoRequest, 'generated/azure_mgmt_web/models/domain_control_center_sso_request.rb' autoload :HybridConnectionCollection, 'generated/azure_mgmt_web/models/hybrid_connection_collection.rb' - autoload :WorkerPool, 'generated/azure_mgmt_web/models/worker_pool.rb' + autoload :NameIdentifierCollection, 'generated/azure_mgmt_web/models/name_identifier_collection.rb' autoload :DeploymentCollection, 'generated/azure_mgmt_web/models/deployment_collection.rb' - autoload :TldLegalAgreement, 'generated/azure_mgmt_web/models/tld_legal_agreement.rb' + autoload :TopLevelDomainAgreementOption, 'generated/azure_mgmt_web/models/top_level_domain_agreement_option.rb' autoload :EnabledConfig, 'generated/azure_mgmt_web/models/enabled_config.rb' - autoload :TopLevelDomainCollection, 'generated/azure_mgmt_web/models/top_level_domain_collection.rb' + autoload :CertificateCollection, 'generated/azure_mgmt_web/models/certificate_collection.rb' autoload :FileSystemHttpLogsConfig, 'generated/azure_mgmt_web/models/file_system_http_logs_config.rb' - autoload :ApiDefinitionInfo, 'generated/azure_mgmt_web/models/api_definition_info.rb' + autoload :RequestsBasedTrigger, 'generated/azure_mgmt_web/models/requests_based_trigger.rb' autoload :WorkerPoolCollection, 'generated/azure_mgmt_web/models/worker_pool_collection.rb' - autoload :StatusCodesBasedTrigger, 'generated/azure_mgmt_web/models/status_codes_based_trigger.rb' + autoload :AutoHealRules, 'generated/azure_mgmt_web/models/auto_heal_rules.rb' autoload :HostNameBindingCollection, 'generated/azure_mgmt_web/models/host_name_binding_collection.rb' - autoload :CloningInfo, 'generated/azure_mgmt_web/models/cloning_info.rb' + autoload :HostNameSslState, 'generated/azure_mgmt_web/models/host_name_ssl_state.rb' autoload :HttpLogsConfig, 'generated/azure_mgmt_web/models/http_logs_config.rb' - autoload :NameValuePair, 'generated/azure_mgmt_web/models/name_value_pair.rb' + autoload :VirtualDirectory, 'generated/azure_mgmt_web/models/virtual_directory.rb' autoload :UsageCollection, 'generated/azure_mgmt_web/models/usage_collection.rb' - autoload :VirtualApplication, 'generated/azure_mgmt_web/models/virtual_application.rb' + autoload :SiteLimits, 'generated/azure_mgmt_web/models/site_limits.rb' autoload :StampCapacityCollection, 'generated/azure_mgmt_web/models/stamp_capacity_collection.rb' - autoload :PushSettings, 'generated/azure_mgmt_web/models/push_settings.rb' + autoload :SlotSwapStatus, 'generated/azure_mgmt_web/models/slot_swap_status.rb' autoload :SkuInfoCollection, 'generated/azure_mgmt_web/models/sku_info_collection.rb' - autoload :ResourceMetricCollection, 'generated/azure_mgmt_web/models/resource_metric_collection.rb' + autoload :MetricAvailability, 'generated/azure_mgmt_web/models/metric_availability.rb' autoload :IdentifierCollection, 'generated/azure_mgmt_web/models/identifier_collection.rb' - autoload :Capability, 'generated/azure_mgmt_web/models/capability.rb' + autoload :CsmOperationDescription, 'generated/azure_mgmt_web/models/csm_operation_description.rb' autoload :SkuInfo, 'generated/azure_mgmt_web/models/sku_info.rb' - autoload :NameIdentifier, 'generated/azure_mgmt_web/models/name_identifier.rb' + autoload :Capability, 'generated/azure_mgmt_web/models/capability.rb' + autoload :MSDeployLogEntry, 'generated/azure_mgmt_web/models/msdeploy_log_entry.rb' + autoload :Contact, 'generated/azure_mgmt_web/models/contact.rb' autoload :MetricAvailabilily, 'generated/azure_mgmt_web/models/metric_availabilily.rb' - autoload :HostName, 'generated/azure_mgmt_web/models/host_name.rb' + autoload :DomainOwnershipIdentifierCollection, 'generated/azure_mgmt_web/models/domain_ownership_identifier_collection.rb' autoload :HostingEnvironmentDiagnostics, 'generated/azure_mgmt_web/models/hosting_environment_diagnostics.rb' - autoload :DomainRecommendationSearchParameters, 'generated/azure_mgmt_web/models/domain_recommendation_search_parameters.rb' - autoload :VnetInfo, 'generated/azure_mgmt_web/models/vnet_info.rb' - autoload :StampCapacity, 'generated/azure_mgmt_web/models/stamp_capacity.rb' + autoload :HostingEnvironmentProfile, 'generated/azure_mgmt_web/models/hosting_environment_profile.rb' autoload :AppServicePlanCollection, 'generated/azure_mgmt_web/models/app_service_plan_collection.rb' - autoload :AutoHealTriggers, 'generated/azure_mgmt_web/models/auto_heal_triggers.rb' + autoload :SlowRequestsBasedTrigger, 'generated/azure_mgmt_web/models/slow_requests_based_trigger.rb' autoload :SkuDescription, 'generated/azure_mgmt_web/models/sku_description.rb' - autoload :HandlerMapping, 'generated/azure_mgmt_web/models/handler_mapping.rb' + autoload :SiteMachineKey, 'generated/azure_mgmt_web/models/site_machine_key.rb' + autoload :AppServiceEnvironmentCollection, 'generated/azure_mgmt_web/models/app_service_environment_collection.rb' + autoload :IpSecurityRestriction, 'generated/azure_mgmt_web/models/ip_security_restriction.rb' + autoload :AppServiceEnvironment, 'generated/azure_mgmt_web/models/app_service_environment.rb' + autoload :ServiceSpecification, 'generated/azure_mgmt_web/models/service_specification.rb' + autoload :NetworkAccessControlEntry, 'generated/azure_mgmt_web/models/network_access_control_entry.rb' + autoload :SnapshotRecoveryTarget, 'generated/azure_mgmt_web/models/snapshot_recovery_target.rb' + autoload :StampCapacity, 'generated/azure_mgmt_web/models/stamp_capacity.rb' + autoload :TldLegalAgreementCollection, 'generated/azure_mgmt_web/models/tld_legal_agreement_collection.rb' autoload :Operation, 'generated/azure_mgmt_web/models/operation.rb' - autoload :SiteConfig, 'generated/azure_mgmt_web/models/site_config.rb' + autoload :ConnStringInfo, 'generated/azure_mgmt_web/models/conn_string_info.rb' autoload :PerfMonSample, 'generated/azure_mgmt_web/models/perf_mon_sample.rb' - autoload :WebAppInstanceCollection, 'generated/azure_mgmt_web/models/web_app_instance_collection.rb' + autoload :CsmOperationDisplay, 'generated/azure_mgmt_web/models/csm_operation_display.rb' autoload :PerfMonSet, 'generated/azure_mgmt_web/models/perf_mon_set.rb' - autoload :DomainCollection, 'generated/azure_mgmt_web/models/domain_collection.rb' + autoload :DomainAvailablilityCheckResult, 'generated/azure_mgmt_web/models/domain_availablility_check_result.rb' autoload :PerfMonResponse, 'generated/azure_mgmt_web/models/perf_mon_response.rb' - autoload :AutoHealActions, 'generated/azure_mgmt_web/models/auto_heal_actions.rb' + autoload :RampUpRule, 'generated/azure_mgmt_web/models/ramp_up_rule.rb' autoload :PerfMonCounterCollection, 'generated/azure_mgmt_web/models/perf_mon_counter_collection.rb' - autoload :Experiments, 'generated/azure_mgmt_web/models/experiments.rb' - autoload :AppServiceEnvironmentCollection, 'generated/azure_mgmt_web/models/app_service_environment_collection.rb' - autoload :SiteSeal, 'generated/azure_mgmt_web/models/site_seal.rb' - autoload :AppServiceEnvironment, 'generated/azure_mgmt_web/models/app_service_environment.rb' - autoload :CorsSettings, 'generated/azure_mgmt_web/models/cors_settings.rb' - autoload :NetworkAccessControlEntry, 'generated/azure_mgmt_web/models/network_access_control_entry.rb' - autoload :ResourceMetricDefinitionCollection, 'generated/azure_mgmt_web/models/resource_metric_definition_collection.rb' - autoload :ResourceMetricName, 'generated/azure_mgmt_web/models/resource_metric_name.rb' + autoload :AutoHealCustomAction, 'generated/azure_mgmt_web/models/auto_heal_custom_action.rb' + autoload :WorkerPool, 'generated/azure_mgmt_web/models/worker_pool.rb' autoload :Recommendation, 'generated/azure_mgmt_web/models/recommendation.rb' - autoload :ResourceMetricProperty, 'generated/azure_mgmt_web/models/resource_metric_property.rb' + autoload :VirtualNetworkProfile, 'generated/azure_mgmt_web/models/virtual_network_profile.rb' autoload :AppServiceCertificateResource, 'generated/azure_mgmt_web/models/app_service_certificate_resource.rb' autoload :AppServiceCertificateOrder, 'generated/azure_mgmt_web/models/app_service_certificate_order.rb' autoload :CertificateEmail, 'generated/azure_mgmt_web/models/certificate_email.rb' @@ -168,6 +177,7 @@ module Models autoload :DomainOwnershipIdentifier, 'generated/azure_mgmt_web/models/domain_ownership_identifier.rb' autoload :TopLevelDomain, 'generated/azure_mgmt_web/models/top_level_domain.rb' autoload :Certificate, 'generated/azure_mgmt_web/models/certificate.rb' + autoload :PushSettings, 'generated/azure_mgmt_web/models/push_settings.rb' autoload :DeletedSite, 'generated/azure_mgmt_web/models/deleted_site.rb' autoload :GeoRegion, 'generated/azure_mgmt_web/models/geo_region.rb' autoload :PremierAddOnOffer, 'generated/azure_mgmt_web/models/premier_add_on_offer.rb' @@ -182,14 +192,18 @@ module Models autoload :HybridConnection, 'generated/azure_mgmt_web/models/hybrid_connection.rb' autoload :HybridConnectionKey, 'generated/azure_mgmt_web/models/hybrid_connection_key.rb' autoload :Identifier, 'generated/azure_mgmt_web/models/identifier.rb' + autoload :MSDeploy, 'generated/azure_mgmt_web/models/msdeploy.rb' + autoload :MSDeployLog, 'generated/azure_mgmt_web/models/msdeploy_log.rb' + autoload :MSDeployStatus, 'generated/azure_mgmt_web/models/msdeploy_status.rb' autoload :MigrateMySqlRequest, 'generated/azure_mgmt_web/models/migrate_my_sql_request.rb' autoload :MigrateMySqlStatus, 'generated/azure_mgmt_web/models/migrate_my_sql_status.rb' autoload :VnetRoute, 'generated/azure_mgmt_web/models/vnet_route.rb' + autoload :VnetInfo, 'generated/azure_mgmt_web/models/vnet_info.rb' autoload :RelayServiceConnectionEntity, 'generated/azure_mgmt_web/models/relay_service_connection_entity.rb' autoload :NetworkFeatures, 'generated/azure_mgmt_web/models/network_features.rb' autoload :PremierAddOn, 'generated/azure_mgmt_web/models/premier_add_on.rb' + autoload :PublicCertificate, 'generated/azure_mgmt_web/models/public_certificate.rb' autoload :RecoverResponse, 'generated/azure_mgmt_web/models/recover_response.rb' - autoload :ResourceHealthMetadata, 'generated/azure_mgmt_web/models/resource_health_metadata.rb' autoload :ResourceMetricDefinition, 'generated/azure_mgmt_web/models/resource_metric_definition.rb' autoload :RestoreRequest, 'generated/azure_mgmt_web/models/restore_request.rb' autoload :RestoreResponse, 'generated/azure_mgmt_web/models/restore_response.rb' @@ -204,6 +218,7 @@ module Models autoload :SlotConfigNamesResource, 'generated/azure_mgmt_web/models/slot_config_names_resource.rb' autoload :SlotDifference, 'generated/azure_mgmt_web/models/slot_difference.rb' autoload :Snapshot, 'generated/azure_mgmt_web/models/snapshot.rb' + autoload :SnapshotRecoveryRequest, 'generated/azure_mgmt_web/models/snapshot_recovery_request.rb' autoload :StorageMigrationOptions, 'generated/azure_mgmt_web/models/storage_migration_options.rb' autoload :StorageMigrationResponse, 'generated/azure_mgmt_web/models/storage_migration_response.rb' autoload :StringDictionary, 'generated/azure_mgmt_web/models/string_dictionary.rb' @@ -248,8 +263,12 @@ module Models autoload :BackupRestoreOperationType, 'generated/azure_mgmt_web/models/backup_restore_operation_type.rb' autoload :PublishingProfileFormat, 'generated/azure_mgmt_web/models/publishing_profile_format.rb' autoload :DnsVerificationTestResult, 'generated/azure_mgmt_web/models/dns_verification_test_result.rb' + autoload :MSDeployLogEntryType, 'generated/azure_mgmt_web/models/msdeploy_log_entry_type.rb' + autoload :MSDeployProvisioningState, 'generated/azure_mgmt_web/models/msdeploy_provisioning_state.rb' + autoload :MySqlMigrationType, 'generated/azure_mgmt_web/models/my_sql_migration_type.rb' autoload :OperationStatus, 'generated/azure_mgmt_web/models/operation_status.rb' autoload :RouteType, 'generated/azure_mgmt_web/models/route_type.rb' + autoload :PublicCertificateLocation, 'generated/azure_mgmt_web/models/public_certificate_location.rb' autoload :UnauthenticatedClientAction, 'generated/azure_mgmt_web/models/unauthenticated_client_action.rb' autoload :BuiltInAuthenticationProvider, 'generated/azure_mgmt_web/models/built_in_authentication_provider.rb' autoload :CloneAbilityResult, 'generated/azure_mgmt_web/models/clone_ability_result.rb' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/app_service_certificate_orders.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/app_service_certificate_orders.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/app_service_environments.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/app_service_environments.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/app_service_plans.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/app_service_plans.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/certificates.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/certificates.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/deleted_web_apps.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/deleted_web_apps.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/domains.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/domains.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/access_control_entry_action.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/access_control_entry_action.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/address.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/address.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/address_response.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/address_response.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/api_definition_info.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/api_definition_info.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_order.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_order.rb old mode 100755 new mode 100644 index a8b77d707a..fc1400e782 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_order.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_order.rb @@ -107,6 +107,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -128,6 +129,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_order_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_order_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_resource.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_resource.rb old mode 100755 new mode 100644 index b29aa8d2f1..27abcd223f --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_resource.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_certificate_resource.rb @@ -52,6 +52,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -73,6 +74,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment_resource.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment_resource.rb old mode 100755 new mode 100644 index 626504688c..dbf167d12a --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment_resource.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_environment_resource.rb @@ -170,6 +170,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -191,6 +192,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan.rb old mode 100755 new mode 100644 index cb0bb82f98..3ddf7582f9 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan.rb @@ -92,6 +92,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -113,6 +114,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan_restrictions.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/app_service_plan_restrictions.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/application_logs_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/application_logs_config.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_action_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_action_type.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_actions.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_actions.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_custom_action.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_custom_action.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_rules.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_rules.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_triggers.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/auto_heal_triggers.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_blob_storage_application_logs_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_blob_storage_application_logs_config.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb old mode 100755 new mode 100644 index d84ec6c101..b38a1f3e23 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb @@ -22,7 +22,8 @@ class AzureBlobStorageHttpLogsConfig # 0 or lower means no retention. attr_accessor :retention_in_days - # @return [Boolean] Enabled. + # @return [Boolean] True if configuration is enabled, false if it is + # disabled and null if configuration is not set. attr_accessor :enabled diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_resource_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_resource_type.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_table_storage_application_logs_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/azure_table_storage_application_logs_config.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item.rb old mode 100755 new mode 100644 index cbd0b21cd4..4aae341795 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item.rb @@ -8,7 +8,7 @@ module Models # # Backup description. # - class BackupItem < MsRestAzure::Resource + class BackupItem < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -87,6 +87,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -99,34 +100,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, backup_id: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_item_status.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_request.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_request.rb old mode 100755 new mode 100644 index 99ac8081be..1e4a7c5629 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_request.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_request.rb @@ -8,7 +8,7 @@ module Models # # Description of a backup which will be performed. # - class BackupRequest < MsRestAzure::Resource + class BackupRequest < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -33,7 +33,7 @@ class BackupRequest < MsRestAzure::Resource attr_accessor :databases # @return [BackupRestoreOperationType] Type of the backup. Possible - # values include: 'Default', 'Clone', 'Relocation' + # values include: 'Default', 'Clone', 'Relocation', 'Snapshot' attr_accessor :backup_request_type @@ -59,6 +59,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -71,34 +72,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, backup_request_name: { required: false, serialized_name: 'properties.name', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_restore_operation_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_restore_operation_type.rb old mode 100755 new mode 100644 index 33c69bd33d..bd4b6a4826 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_restore_operation_type.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_restore_operation_type.rb @@ -12,6 +12,7 @@ module BackupRestoreOperationType Default = "Default" Clone = "Clone" Relocation = "Relocation" + Snapshot = "Snapshot" end end end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_schedule.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/backup_schedule.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/built_in_authentication_provider.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/built_in_authentication_provider.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/capability.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/capability.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate.rb old mode 100755 new mode 100644 index 6cbf43fed5..b6a20d870a --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate.rb @@ -108,6 +108,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -129,6 +130,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_details.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_details.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_email.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_email.rb old mode 100755 new mode 100644 index 64f10583a3..a1aa97ab53 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_email.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_email.rb @@ -8,7 +8,7 @@ module Models # # SSL certificate email. # - class CertificateEmail < MsRestAzure::Resource + class CertificateEmail < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -42,6 +42,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -54,34 +55,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, email_id: { required: false, serialized_name: 'properties.emailId', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_action.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_action.rb old mode 100755 new mode 100644 index cba2c9202c..b6286be8fc --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_action.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_action.rb @@ -48,6 +48,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -69,6 +70,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_action_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_action_type.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_order_status.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_product_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/certificate_product_type.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/channels.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/channels.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/check_name_resource_types.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/check_name_resource_types.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/clone_ability_result.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/clone_ability_result.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/cloning_info.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/cloning_info.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/compute_mode_options.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/compute_mode_options.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/conn_string_info.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/conn_string_info.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/conn_string_value_type_pair.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/conn_string_value_type_pair.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/connection_string_dictionary.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/connection_string_dictionary.rb old mode 100755 new mode 100644 index a675ecf57c..48066e8fb9 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/connection_string_dictionary.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/connection_string_dictionary.rb @@ -8,7 +8,7 @@ module Models # # String dictionary resource. # - class ConnectionStringDictionary < MsRestAzure::Resource + class ConnectionStringDictionary < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -39,6 +39,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -51,34 +52,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, properties: { required: false, serialized_name: 'properties', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/connection_string_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/connection_string_type.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/contact.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/contact.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/cors_settings.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/cors_settings.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_move_resource_envelope.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_move_resource_envelope.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_collection.rb new file mode 100644 index 0000000000..bdf47a3d48 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_collection.rb @@ -0,0 +1,94 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Collection of Azure resource manager operation metadata. + # + class CsmOperationCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Collection of resources. + attr_accessor :value + + # @return [String] Link to next page of resources. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [CsmOperationCollection] with next page content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end + + # + # Mapper for CsmOperationCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CsmOperationCollection', + type: { + name: 'Composite', + class_name: 'CsmOperationCollection', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'CsmOperationDescriptionElementType', + type: { + name: 'Composite', + class_name: 'CsmOperationDescription' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_description.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_description.rb new file mode 100644 index 0000000000..d40f5f6a5d --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_description.rb @@ -0,0 +1,78 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Model object. + # + # + class CsmOperationDescription + + include MsRestAzure + + include MsRest::JSONable + # @return [String] + attr_accessor :name + + # @return [CsmOperationDisplay] + attr_accessor :display + + # @return [String] + attr_accessor :origin + + # @return [CsmOperationDescriptionProperties] + attr_accessor :properties + + + # + # Mapper for CsmOperationDescription class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CsmOperationDescription', + type: { + name: 'Composite', + class_name: 'CsmOperationDescription', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display: { + required: false, + serialized_name: 'display', + type: { + name: 'Composite', + class_name: 'CsmOperationDisplay' + } + }, + origin: { + required: false, + serialized_name: 'origin', + type: { + name: 'String' + } + }, + properties: { + required: false, + serialized_name: 'properties', + type: { + name: 'Composite', + class_name: 'CsmOperationDescriptionProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_description_properties.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_description_properties.rb new file mode 100644 index 0000000000..d7634367bd --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_description_properties.rb @@ -0,0 +1,47 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Model object. + # + # + class CsmOperationDescriptionProperties + + include MsRestAzure + + include MsRest::JSONable + # @return [ServiceSpecification] + attr_accessor :service_specification + + + # + # Mapper for CsmOperationDescriptionProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CsmOperationDescriptionProperties', + type: { + name: 'Composite', + class_name: 'CsmOperationDescriptionProperties', + model_properties: { + service_specification: { + required: false, + serialized_name: 'serviceSpecification', + type: { + name: 'Composite', + class_name: 'ServiceSpecification' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_display.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_display.rb new file mode 100644 index 0000000000..3fe8d2c8ae --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_operation_display.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Model object. + # + # + class CsmOperationDisplay + + include MsRestAzure + + include MsRest::JSONable + # @return [String] + attr_accessor :provider + + # @return [String] + attr_accessor :resource + + # @return [String] + attr_accessor :operation + + # @return [String] + attr_accessor :description + + + # + # Mapper for CsmOperationDisplay class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'CsmOperationDisplay', + type: { + name: 'Composite', + class_name: 'CsmOperationDisplay', + model_properties: { + provider: { + required: false, + serialized_name: 'provider', + type: { + name: 'String' + } + }, + resource: { + required: false, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + operation: { + required: false, + serialized_name: 'operation', + type: { + name: 'String' + } + }, + description: { + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_publishing_profile_options.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_publishing_profile_options.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_site_recovery_entity.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_site_recovery_entity.rb deleted file mode 100755 index ff7633abcb..0000000000 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_site_recovery_entity.rb +++ /dev/null @@ -1,68 +0,0 @@ -# encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. - -module Azure::ARM::Web - module Models - # - # Details about app recovery operation. - # - class CsmSiteRecoveryEntity - - include MsRestAzure - - include MsRest::JSONable - # @return [DateTime] Point in time in which the app recovery should be - # attempted. - attr_accessor :snapshot_time - - # @return [String] [Optional] Destination app name into which app should - # be recovered. This is case when new app should be created instead. - attr_accessor :site_name - - # @return [String] [Optional] Destination app slot name into which app - # should be recovered. - attr_accessor :slot_name - - - # - # Mapper for CsmSiteRecoveryEntity class as Ruby Hash. - # This will be used for serialization/deserialization. - # - def self.mapper() - { - required: false, - serialized_name: 'CsmSiteRecoveryEntity', - type: { - name: 'Composite', - class_name: 'CsmSiteRecoveryEntity', - model_properties: { - snapshot_time: { - required: false, - serialized_name: 'snapshotTime', - type: { - name: 'DateTime' - } - }, - site_name: { - required: false, - serialized_name: 'siteName', - type: { - name: 'String' - } - }, - slot_name: { - required: false, - serialized_name: 'slotName', - type: { - name: 'String' - } - } - } - } - } - end - end - end -end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_slot_entity.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_slot_entity.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_usage_quota.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_usage_quota.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_usage_quota_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/csm_usage_quota_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/custom_host_name_dns_record_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/custom_host_name_dns_record_type.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/custom_hostname_analysis_result.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/custom_hostname_analysis_result.rb old mode 100755 new mode 100644 index 84bec5fb1f..ac02c80f76 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/custom_hostname_analysis_result.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/custom_hostname_analysis_result.rb @@ -8,7 +8,7 @@ module Models # # Custom domain analysis. # - class CustomHostnameAnalysisResult < MsRestAzure::Resource + class CustomHostnameAnalysisResult < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -79,6 +79,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -91,34 +92,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, is_hostname_already_verified: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/database_backup_setting.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/database_backup_setting.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/database_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/database_type.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deleted_site.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deleted_site.rb old mode 100755 new mode 100644 index b31dd48337..ca9011a135 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deleted_site.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deleted_site.rb @@ -168,6 +168,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -189,6 +190,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deleted_web_app_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deleted_web_app_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deployment.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deployment.rb old mode 100755 new mode 100644 index 1584a7b76b..aec77f5a65 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deployment.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deployment.rb @@ -8,24 +8,24 @@ module Models # # User crendentials used for publishing activity. # - class Deployment < MsRestAzure::Resource + class Deployment < MsRestAzure::ProxyOnlyResource include MsRestAzure include MsRest::JSONable - # @return [String] ID. + # @return [String] Identifier for deployment. attr_accessor :deployment_id - # @return [Integer] Status. + # @return [Integer] Deployment status. attr_accessor :status - # @return [String] Message. + # @return [String] Details about deployment status. attr_accessor :message - # @return [String] Author. + # @return [String] Who authored the deployment. attr_accessor :author - # @return [String] Deployer. + # @return [String] Who performed the deployment. attr_accessor :deployer # @return [String] Author email. @@ -37,10 +37,11 @@ class Deployment < MsRestAzure::Resource # @return [DateTime] End time. attr_accessor :end_time - # @return [Boolean] Active. + # @return [Boolean] True if deployment is currently active, false if + # completed and null if not started. attr_accessor :active - # @return [String] Detail. + # @return [String] Details on deployment. attr_accessor :details @@ -66,6 +67,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -78,34 +80,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, deployment_id: { required: false, serialized_name: 'properties.id', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deployment_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/deployment_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/dimension.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/dimension.rb new file mode 100644 index 0000000000..30433b25ee --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/dimension.rb @@ -0,0 +1,76 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Model object. + # + # + class Dimension + + include MsRestAzure + + include MsRest::JSONable + # @return [String] + attr_accessor :name + + # @return [String] + attr_accessor :display_name + + # @return [String] + attr_accessor :internal_name + + # @return [Boolean] + attr_accessor :to_be_exported_for_shoebox + + + # + # Mapper for Dimension class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'Dimension', + type: { + name: 'Composite', + class_name: 'Dimension', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'displayName', + type: { + name: 'String' + } + }, + internal_name: { + required: false, + serialized_name: 'internalName', + type: { + name: 'String' + } + }, + to_be_exported_for_shoebox: { + required: false, + serialized_name: 'toBeExportedForShoebox', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/dns_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/dns_type.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/dns_verification_test_result.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/dns_verification_test_result.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain.rb old mode 100755 new mode 100644 index 72ad8046e2..b57bb0598d --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain.rb @@ -110,6 +110,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -131,6 +132,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_availablility_check_result.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_availablility_check_result.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_control_center_sso_request.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_control_center_sso_request.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_ownership_identifier.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_ownership_identifier.rb old mode 100755 new mode 100644 index 3d64f5fdfc..e670a44873 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_ownership_identifier.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_ownership_identifier.rb @@ -39,6 +39,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -60,6 +61,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_ownership_identifier_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_ownership_identifier_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_purchase_consent.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_purchase_consent.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_recommendation_search_parameters.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_recommendation_search_parameters.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_status.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/domain_type.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/enabled_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/enabled_config.rb old mode 100755 new mode 100644 index 3731d10f0e..a416a1e8f7 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/enabled_config.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/enabled_config.rb @@ -13,7 +13,8 @@ class EnabledConfig include MsRestAzure include MsRest::JSONable - # @return [Boolean] Enabled. + # @return [Boolean] True if configuration is enabled, false if it is + # disabled and null if configuration is not set. attr_accessor :enabled diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/error_entity.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/error_entity.rb old mode 100755 new mode 100644 index a3d4439649..48773333f0 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/error_entity.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/error_entity.rb @@ -13,6 +13,12 @@ class ErrorEntity include MsRestAzure include MsRest::JSONable + # @return [String] Basic error code. + attr_accessor :code + + # @return [String] Any details of the error. + attr_accessor :message + # @return [String] Type of error. attr_accessor :extended_code @@ -25,12 +31,6 @@ class ErrorEntity # @return [Array] Inner errors. attr_accessor :inner_errors - # @return [String] Basic error code. - attr_accessor :code - - # @return [String] Any details of the error. - attr_accessor :message - # # Mapper for ErrorEntity class as Ruby Hash. @@ -44,6 +44,20 @@ def self.mapper() name: 'Composite', class_name: 'ErrorEntity', model_properties: { + code: { + required: false, + serialized_name: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + serialized_name: 'message', + type: { + name: 'String' + } + }, extended_code: { required: false, serialized_name: 'extendedCode', @@ -86,20 +100,6 @@ def self.mapper() } } } - }, - code: { - required: false, - serialized_name: 'code', - type: { - name: 'String' - } - }, - message: { - required: false, - serialized_name: 'message', - type: { - name: 'String' - } } } } diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/experiments.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/experiments.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/file_system_application_logs_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/file_system_application_logs_config.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/file_system_http_logs_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/file_system_http_logs_config.rb old mode 100755 new mode 100644 index 77e1829848..84963bfef0 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/file_system_http_logs_config.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/file_system_http_logs_config.rb @@ -24,7 +24,8 @@ class FileSystemHttpLogsConfig # 0 or lower means no retention. attr_accessor :retention_in_days - # @return [Boolean] Enabled. + # @return [Boolean] True if configuration is enabled, false if it is + # disabled and null if configuration is not set. attr_accessor :enabled diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/frequency_unit.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/frequency_unit.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/geo_region.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/geo_region.rb old mode 100755 new mode 100644 index b4978f9349..b64e57f93b --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/geo_region.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/geo_region.rb @@ -8,7 +8,7 @@ module Models # # Geographical region. # - class GeoRegion < MsRestAzure::Resource + class GeoRegion < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -45,6 +45,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -57,34 +58,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, geo_region_name: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/geo_region_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/geo_region_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/global_csm_sku_description.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/global_csm_sku_description.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/handler_mapping.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/handler_mapping.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_binding.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_binding.rb old mode 100755 new mode 100644 index ab974e914f..7b120725d0 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_binding.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_binding.rb @@ -8,7 +8,7 @@ module Models # # A hostname binding object. # - class HostNameBinding < MsRestAzure::Resource + class HostNameBinding < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -71,6 +71,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -83,34 +84,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, host_name_binding_name: { required: false, serialized_name: 'properties.name', @@ -180,6 +161,7 @@ def self.mapper() }, virtual_ip: { required: false, + read_only: true, serialized_name: 'properties.virtualIP', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_binding_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_binding_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_ssl_state.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_ssl_state.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_name_type.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/host_type.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hosting_environment_diagnostics.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hosting_environment_diagnostics.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hosting_environment_profile.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hosting_environment_profile.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hosting_environment_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hosting_environment_status.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/http_logs_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/http_logs_config.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection.rb old mode 100755 new mode 100644 index b880ab6712..1493ec2557 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection.rb @@ -9,7 +9,7 @@ module Models # Hybrid Connection contract. This is used to configure a Hybrid # Connection. # - class HybridConnection < MsRestAzure::Resource + class HybridConnection < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -38,6 +38,10 @@ class HybridConnection < MsRestAzure::Resource # normally, use the POST /listKeys API instead. attr_accessor :send_key_value + # @return [String] The suffix for the service bus endpoint. By default + # this is .servicebus.windows.net + attr_accessor :service_bus_suffix + # # Mapper for HybridConnection class as Ruby Hash. @@ -61,6 +65,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -73,34 +78,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, service_bus_namespace: { required: false, serialized_name: 'properties.serviceBusNamespace', @@ -149,6 +134,13 @@ def self.mapper() type: { name: 'String' } + }, + service_bus_suffix: { + required: false, + serialized_name: 'properties.serviceBusSuffix', + type: { + name: 'String' + } } } } diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_key.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_key.rb old mode 100755 new mode 100644 index bbc3a3fa09..5eac114f08 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_key.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_key.rb @@ -9,7 +9,7 @@ module Models # Hybrid Connection key contract. This has the send key name and value for # a Hybrid Connection. # - class HybridConnectionKey < MsRestAzure::Resource + class HybridConnectionKey < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -43,6 +43,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -55,34 +56,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, send_key_name: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_limits.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_limits.rb old mode 100755 new mode 100644 index a9ac0f5e7b..9419139fda --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_limits.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/hybrid_connection_limits.rb @@ -9,7 +9,7 @@ module Models # Hybrid Connection limits contract. This is used to return the plan limits # of Hybrid Connections. # - class HybridConnectionLimits < MsRestAzure::Resource + class HybridConnectionLimits < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -43,6 +43,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -55,34 +56,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, current: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/identifier.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/identifier.rb old mode 100755 new mode 100644 index d6a03f45be..81dbc377a7 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/identifier.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/identifier.rb @@ -8,12 +8,12 @@ module Models # # Identifier. # - class Identifier < MsRestAzure::Resource + class Identifier < MsRestAzure::ProxyOnlyResource include MsRestAzure include MsRest::JSONable - # @return [String] ID. + # @return [String] String representation of the identity. attr_accessor :identifier_id @@ -39,6 +39,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -51,34 +52,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, identifier_id: { required: false, serialized_name: 'properties.id', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/identifier_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/identifier_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/in_availability_reason_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/in_availability_reason_type.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/internal_load_balancing_mode.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/internal_load_balancing_mode.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/ip_security_restriction.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/ip_security_restriction.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/key_vault_secret_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/key_vault_secret_status.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/localizable_string.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/localizable_string.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/log_level.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/log_level.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/managed_pipeline_mode.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/managed_pipeline_mode.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_availabilily.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_availabilily.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_availability.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_availability.rb new file mode 100644 index 0000000000..1eb9df156d --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_availability.rb @@ -0,0 +1,56 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Model object. + # + # + class MetricAvailability + + include MsRestAzure + + include MsRest::JSONable + # @return [String] + attr_accessor :time_grain + + # @return [String] + attr_accessor :blob_duration + + + # + # Mapper for MetricAvailability class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MetricAvailability', + type: { + name: 'Composite', + class_name: 'MetricAvailability', + model_properties: { + time_grain: { + required: false, + serialized_name: 'timeGrain', + type: { + name: 'String' + } + }, + blob_duration: { + required: false, + serialized_name: 'blobDuration', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_definition.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_definition.rb old mode 100755 new mode 100644 index 74d0578610..c5f4e83643 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_definition.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_definition.rb @@ -8,7 +8,7 @@ module Models # # Metadata for a metric. # - class MetricDefinition < MsRestAzure::Resource + class MetricDefinition < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -52,6 +52,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -64,34 +65,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, metric_definition_name: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_specification.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_specification.rb new file mode 100644 index 0000000000..c28691fdc5 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/metric_specification.rb @@ -0,0 +1,202 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Model object. + # + # + class MetricSpecification + + include MsRestAzure + + include MsRest::JSONable + # @return [String] + attr_accessor :name + + # @return [String] + attr_accessor :display_name + + # @return [String] + attr_accessor :display_description + + # @return [String] + attr_accessor :unit + + # @return [String] + attr_accessor :aggregation_type + + # @return [Boolean] + attr_accessor :supports_instance_level_aggregation + + # @return [Boolean] + attr_accessor :enable_regional_mdm_account + + # @return [String] + attr_accessor :source_mdm_account + + # @return [String] + attr_accessor :source_mdm_namespace + + # @return [String] + attr_accessor :metric_filter_pattern + + # @return [Boolean] + attr_accessor :fill_gap_with_zero + + # @return [Boolean] + attr_accessor :is_internal + + # @return [Array] + attr_accessor :dimensions + + # @return [String] + attr_accessor :category + + # @return [Array] + attr_accessor :availabilities + + + # + # Mapper for MetricSpecification class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MetricSpecification', + type: { + name: 'Composite', + class_name: 'MetricSpecification', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display_name: { + required: false, + serialized_name: 'displayName', + type: { + name: 'String' + } + }, + display_description: { + required: false, + serialized_name: 'displayDescription', + type: { + name: 'String' + } + }, + unit: { + required: false, + serialized_name: 'unit', + type: { + name: 'String' + } + }, + aggregation_type: { + required: false, + serialized_name: 'aggregationType', + type: { + name: 'String' + } + }, + supports_instance_level_aggregation: { + required: false, + serialized_name: 'supportsInstanceLevelAggregation', + type: { + name: 'Boolean' + } + }, + enable_regional_mdm_account: { + required: false, + serialized_name: 'enableRegionalMdmAccount', + type: { + name: 'Boolean' + } + }, + source_mdm_account: { + required: false, + serialized_name: 'sourceMdmAccount', + type: { + name: 'String' + } + }, + source_mdm_namespace: { + required: false, + serialized_name: 'sourceMdmNamespace', + type: { + name: 'String' + } + }, + metric_filter_pattern: { + required: false, + serialized_name: 'metricFilterPattern', + type: { + name: 'String' + } + }, + fill_gap_with_zero: { + required: false, + serialized_name: 'fillGapWithZero', + type: { + name: 'Boolean' + } + }, + is_internal: { + required: false, + serialized_name: 'isInternal', + type: { + name: 'Boolean' + } + }, + dimensions: { + required: false, + serialized_name: 'dimensions', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'DimensionElementType', + type: { + name: 'Composite', + class_name: 'Dimension' + } + } + } + }, + category: { + required: false, + serialized_name: 'category', + type: { + name: 'String' + } + }, + availabilities: { + required: false, + serialized_name: 'availabilities', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'MetricAvailabilityElementType', + type: { + name: 'Composite', + class_name: 'MetricAvailability' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/migrate_my_sql_request.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/migrate_my_sql_request.rb old mode 100755 new mode 100644 index ee46a4db9d..134a53f65a --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/migrate_my_sql_request.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/migrate_my_sql_request.rb @@ -8,15 +8,18 @@ module Models # # MySQL migration request. # - class MigrateMySqlRequest < MsRestAzure::Resource + class MigrateMySqlRequest < MsRestAzure::ProxyOnlyResource include MsRestAzure include MsRest::JSONable - # @return [String] Connection string to the remote MySQL database to - # which data should be migrated. + # @return [String] Connection string to the remote MySQL database. attr_accessor :connection_string + # @return [MySqlMigrationType] The type of migration operation to be + # done. Possible values include: 'LocalToRemote', 'RemoteToLocal' + attr_accessor :migration_type + # # Mapper for MigrateMySqlRequest class as Ruby Hash. @@ -40,6 +43,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -52,39 +56,27 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { + connection_string: { required: false, - serialized_name: 'tags', + serialized_name: 'properties.connectionString', type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } + name: 'String' } }, - connection_string: { + migration_type: { required: false, - serialized_name: 'properties.connectionString', + serialized_name: 'properties.migrationType', type: { - name: 'String' + name: 'Enum', + module: 'MySqlMigrationType' } } } diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/migrate_my_sql_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/migrate_my_sql_status.rb old mode 100755 new mode 100644 index 382ed0c2d3..dc52e936a3 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/migrate_my_sql_status.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/migrate_my_sql_status.rb @@ -8,7 +8,7 @@ module Models # # MySQL migration status. # - class MigrateMySqlStatus < MsRestAzure::Resource + class MigrateMySqlStatus < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -46,6 +46,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -58,34 +59,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, migration_operation_status: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy.rb new file mode 100644 index 0000000000..4317af8d16 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy.rb @@ -0,0 +1,148 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # MSDeploy ARM PUT information + # + class MSDeploy < MsRestAzure::ProxyOnlyResource + + include MsRestAzure + + include MsRest::JSONable + # @return [String] Package URI + attr_accessor :package_uri + + # @return [String] SQL Connection String + attr_accessor :connection_string + + # @return [String] Database Type + attr_accessor :db_type + + # @return [String] URI of MSDeploy Parameters file. Must not be set if + # SetParameters is used. + attr_accessor :set_parameters_xml_file_uri + + # @return [Hash{String => String}] MSDeploy Parameters. Must not be set + # if SetParametersXmlFileUri is used. + attr_accessor :set_parameters + + # @return [Boolean] Controls whether the MSDeploy operation skips the + # AppData directory. If set to true, the existing AppData directory on + # the destination will not be deleted and overwritten. + attr_accessor :skip_app_data + + # @return [Boolean] Sets the AppOffline rule while the MSDeploy operation + # executes. + attr_accessor :app_offline + + + # + # Mapper for MSDeploy class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MSDeploy', + type: { + name: 'Composite', + class_name: 'MSDeploy', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + package_uri: { + required: false, + serialized_name: 'properties.packageUri', + type: { + name: 'String' + } + }, + connection_string: { + required: false, + serialized_name: 'properties.connectionString', + type: { + name: 'String' + } + }, + db_type: { + required: false, + serialized_name: 'properties.dbType', + type: { + name: 'String' + } + }, + set_parameters_xml_file_uri: { + required: false, + serialized_name: 'properties.setParametersXmlFileUri', + type: { + name: 'String' + } + }, + set_parameters: { + required: false, + serialized_name: 'properties.setParameters', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + skip_app_data: { + required: false, + serialized_name: 'properties.skipAppData', + type: { + name: 'Boolean' + } + }, + app_offline: { + required: false, + serialized_name: 'properties.appOffline', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_log.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_log.rb new file mode 100644 index 0000000000..6d2fe4ac99 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_log.rb @@ -0,0 +1,85 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # MSDeploy log + # + class MSDeployLog < MsRestAzure::ProxyOnlyResource + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] List of log entry messages + attr_accessor :entries + + + # + # Mapper for MSDeployLog class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MSDeployLog', + type: { + name: 'Composite', + class_name: 'MSDeployLog', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + entries: { + required: false, + read_only: true, + serialized_name: 'properties.entries', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'MSDeployLogEntryElementType', + type: { + name: 'Composite', + class_name: 'MSDeployLogEntry' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_log_entry.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_log_entry.rb new file mode 100644 index 0000000000..7e256ebb68 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_log_entry.rb @@ -0,0 +1,70 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # MSDeploy log entry + # + class MSDeployLogEntry + + include MsRestAzure + + include MsRest::JSONable + # @return [DateTime] Timestamp of log entry + attr_accessor :time + + # @return [MSDeployLogEntryType] Log entry type. Possible values include: + # 'Message', 'Warning', 'Error' + attr_accessor :type + + # @return [String] Log entry message + attr_accessor :message + + + # + # Mapper for MSDeployLogEntry class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MSDeployLogEntry', + type: { + name: 'Composite', + class_name: 'MSDeployLogEntry', + model_properties: { + time: { + required: false, + read_only: true, + serialized_name: 'time', + type: { + name: 'DateTime' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'Enum', + module: 'MSDeployLogEntryType' + } + }, + message: { + required: false, + read_only: true, + serialized_name: 'message', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_log_entry_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_log_entry_type.rb new file mode 100644 index 0000000000..a672823e9c --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_log_entry_type.rb @@ -0,0 +1,17 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Defines values for MSDeployLogEntryType + # + module MSDeployLogEntryType + Message = "Message" + Warning = "Warning" + Error = "Error" + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_provisioning_state.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_provisioning_state.rb new file mode 100644 index 0000000000..8f376150a0 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_provisioning_state.rb @@ -0,0 +1,19 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Defines values for MSDeployProvisioningState + # + module MSDeployProvisioningState + Accepted = "accepted" + Running = "running" + Succeeded = "succeeded" + Failed = "failed" + Canceled = "canceled" + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_status.rb new file mode 100644 index 0000000000..a394f832d8 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/msdeploy_status.rb @@ -0,0 +1,123 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # MSDeploy ARM response + # + class MSDeployStatus < MsRestAzure::ProxyOnlyResource + + include MsRestAzure + + include MsRest::JSONable + # @return [String] Username of deployer + attr_accessor :deployer + + # @return [MSDeployProvisioningState] Provisioning state. Possible values + # include: 'accepted', 'running', 'succeeded', 'failed', 'canceled' + attr_accessor :provisioning_state + + # @return [DateTime] Start time of deploy operation + attr_accessor :start_time + + # @return [DateTime] End time of deploy operation + attr_accessor :end_time + + # @return [Boolean] Whether the deployment operation has completed + attr_accessor :complete + + + # + # Mapper for MSDeployStatus class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'MSDeployStatus', + type: { + name: 'Composite', + class_name: 'MSDeployStatus', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + deployer: { + required: false, + read_only: true, + serialized_name: 'properties.deployer', + type: { + name: 'String' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'Enum', + module: 'MSDeployProvisioningState' + } + }, + start_time: { + required: false, + read_only: true, + serialized_name: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + end_time: { + required: false, + read_only: true, + serialized_name: 'properties.endTime', + type: { + name: 'DateTime' + } + }, + complete: { + required: false, + read_only: true, + serialized_name: 'properties.complete', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/my_sql_migration_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/my_sql_migration_type.rb new file mode 100644 index 0000000000..e37e69ada1 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/my_sql_migration_type.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Defines values for MySqlMigrationType + # + module MySqlMigrationType + LocalToRemote = "LocalToRemote" + RemoteToLocal = "RemoteToLocal" + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/name_identifier.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/name_identifier.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/name_identifier_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/name_identifier_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/name_value_pair.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/name_value_pair.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/network_access_control_entry.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/network_access_control_entry.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/network_features.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/network_features.rb old mode 100755 new mode 100644 index 6070172681..9742110f63 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/network_features.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/network_features.rb @@ -9,7 +9,7 @@ module Models # Full view of network features for an app (presently VNET integration and # Hybrid Connections). # - class NetworkFeatures < MsRestAzure::Resource + class NetworkFeatures < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -51,6 +51,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -63,34 +64,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, virtual_network_name: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/notification_level.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/notification_level.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/operation.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/operation.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/operation_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/operation_status.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_counter_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_counter_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_response.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_response.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_sample.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_sample.rb old mode 100755 new mode 100644 index 44c040c7b8..59bcd5fb95 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_sample.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_sample.rb @@ -22,6 +22,9 @@ class PerfMonSample # @return [Float] Value of counter at a certain time. attr_accessor :value + # @return [Integer] Core Count of worker. Not a data member + attr_accessor :core_count + # # Mapper for PerfMonSample class as Ruby Hash. @@ -55,6 +58,13 @@ def self.mapper() type: { name: 'Double' } + }, + core_count: { + required: false, + serialized_name: 'coreCount', + type: { + name: 'Number' + } } } } diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_set.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/perf_mon_set.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on.rb old mode 100755 new mode 100644 index f332db7d6b..72d1bcc5ae --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on.rb @@ -60,6 +60,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -81,6 +82,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on_offer.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on_offer.rb old mode 100755 new mode 100644 index c459468d1d..0e1c00432f --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on_offer.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on_offer.rb @@ -8,7 +8,7 @@ module Models # # Premier add-on offer. # - class PremierAddOnOffer < MsRestAzure::Resource + class PremierAddOnOffer < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -72,6 +72,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -84,34 +85,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, sku: { required: false, serialized_name: 'properties.sku', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on_offer_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/premier_add_on_offer_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/provisioning_state.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/provisioning_state.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/proxy_only_resource.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/proxy_only_resource.rb new file mode 100644 index 0000000000..080812dffe --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/proxy_only_resource.rb @@ -0,0 +1,79 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Azure proxy only resource. This resource is not tracked by Azure Resource + # Manager. + # + class ProxyOnlyResource + + include MsRestAzure + + include MsRest::JSONable + # @return [String] Resource Id. + attr_accessor :id + + # @return [String] Resource Name. + attr_accessor :name + + # @return [String] Kind of resource. + attr_accessor :kind + + # @return [String] Resource type. + attr_accessor :type + + + # + # Mapper for ProxyOnlyResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ProxyOnlyResource', + type: { + name: 'Composite', + class_name: 'ProxyOnlyResource', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/public_certificate.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/public_certificate.rb new file mode 100644 index 0000000000..a5fb51953f --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/public_certificate.rb @@ -0,0 +1,99 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Public certificate object + # + class PublicCertificate < MsRestAzure::ProxyOnlyResource + + include MsRestAzure + + include MsRest::JSONable + # @return [String] Public Certificate byte array + attr_accessor :blob + + # @return [PublicCertificateLocation] Public Certificate Location. + # Possible values include: 'CurrentUserMy', 'LocalMachineMy', 'Unknown' + attr_accessor :public_certificate_location + + # @return [String] Certificate Thumbprint + attr_accessor :thumbprint + + + # + # Mapper for PublicCertificate class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PublicCertificate', + type: { + name: 'Composite', + class_name: 'PublicCertificate', + model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + blob: { + required: false, + serialized_name: 'properties.blob', + type: { + name: 'String' + } + }, + public_certificate_location: { + required: false, + serialized_name: 'properties.publicCertificateLocation', + type: { + name: 'Enum', + module: 'PublicCertificateLocation' + } + }, + thumbprint: { + required: false, + read_only: true, + serialized_name: 'properties.thumbprint', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/public_certificate_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/public_certificate_collection.rb new file mode 100644 index 0000000000..86329937fe --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/public_certificate_collection.rb @@ -0,0 +1,94 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Collection of public certificates + # + class PublicCertificateCollection + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Collection of resources. + attr_accessor :value + + # @return [String] Link to next page of resources. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [PublicCertificateCollection] with next page content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end + + # + # Mapper for PublicCertificateCollection class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PublicCertificateCollection', + type: { + name: 'Composite', + class_name: 'PublicCertificateCollection', + model_properties: { + value: { + required: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'PublicCertificateElementType', + type: { + name: 'Composite', + class_name: 'PublicCertificate' + } + } + } + }, + next_link: { + required: false, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/public_certificate_location.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/public_certificate_location.rb new file mode 100644 index 0000000000..3e634479e7 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/public_certificate_location.rb @@ -0,0 +1,17 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Defines values for PublicCertificateLocation + # + module PublicCertificateLocation + CurrentUserMy = "CurrentUserMy" + LocalMachineMy = "LocalMachineMy" + Unknown = "Unknown" + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/publishing_profile_format.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/publishing_profile_format.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/push_settings.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/push_settings.rb old mode 100755 new mode 100644 index dd82f0e402..a30f981fb0 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/push_settings.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/push_settings.rb @@ -8,7 +8,7 @@ module Models # # Push settings for the App. # - class PushSettings + class PushSettings < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -34,6 +34,27 @@ class PushSettings # registration endpoint. attr_accessor :dynamic_tags_json + # @return [Boolean] Gets or sets a flag indicating whether the Push + # endpoint is enabled. + attr_accessor :is_push_enabled1 + + # @return [String] Gets or sets a JSON string containing a list of tags + # that are whitelisted for use by the push registration endpoint. + attr_accessor :tag_whitelist_json1 + + # @return [String] Gets or sets a JSON string containing a list of tags + # that require user authentication to be used in the push registration + # endpoint. + # Tags can consist of alphanumeric characters and the following: + # '_', '@', '#', '.', ':', '-'. + # Validation should be performed at the PushRequestHandler. + attr_accessor :tags_requiring_auth1 + + # @return [String] Gets or sets a JSON string containing a list of + # dynamic tags that will be evaluated from user claims in the push + # registration endpoint. + attr_accessor :dynamic_tags_json1 + # # Mapper for PushSettings class as Ruby Hash. @@ -47,6 +68,37 @@ def self.mapper() name: 'Composite', class_name: 'PushSettings', model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, is_push_enabled: { required: true, serialized_name: 'isPushEnabled', @@ -74,6 +126,34 @@ def self.mapper() type: { name: 'String' } + }, + is_push_enabled1: { + required: false, + serialized_name: 'properties.isPushEnabled', + type: { + name: 'Boolean' + } + }, + tag_whitelist_json1: { + required: false, + serialized_name: 'properties.tagWhitelistJson', + type: { + name: 'String' + } + }, + tags_requiring_auth1: { + required: false, + serialized_name: 'properties.tagsRequiringAuth', + type: { + name: 'String' + } + }, + dynamic_tags_json1: { + required: false, + serialized_name: 'properties.dynamicTagsJson', + type: { + name: 'String' + } } } } diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/ramp_up_rule.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/ramp_up_rule.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/recommendation.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/recommendation.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/recommendation_rule.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/recommendation_rule.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/recover_response.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/recover_response.rb old mode 100755 new mode 100644 index e378baebd2..43184028f2 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/recover_response.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/recover_response.rb @@ -40,6 +40,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -61,6 +62,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/reissue_certificate_order_request.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/reissue_certificate_order_request.rb old mode 100755 new mode 100644 index 8c3b7f1bd7..20888594d0 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/reissue_certificate_order_request.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/reissue_certificate_order_request.rb @@ -50,6 +50,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -71,6 +72,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/relay_service_connection_entity.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/relay_service_connection_entity.rb old mode 100755 new mode 100644 index 38c48a5a1e..3aa8c41f1b --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/relay_service_connection_entity.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/relay_service_connection_entity.rb @@ -8,7 +8,7 @@ module Models # # Hybrid Connection for an App Service app. # - class RelayServiceConnectionEntity < MsRestAzure::Resource + class RelayServiceConnectionEntity < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -57,6 +57,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -69,34 +70,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, entity_name: { required: false, serialized_name: 'properties.entityName', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/renew_certificate_order_request.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/renew_certificate_order_request.rb old mode 100755 new mode 100644 index 6b4d343bd2..e9e5e41c14 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/renew_certificate_order_request.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/renew_certificate_order_request.rb @@ -46,6 +46,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -67,6 +68,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/requests_based_trigger.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/requests_based_trigger.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource.rb old mode 100755 new mode 100644 index 5f4dfa292f..0d43d12048 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource.rb @@ -6,7 +6,7 @@ module Azure::ARM::Web module Models # - # Azure resource. + # Azure resource. This resource is tracked in Azure Resource Manager # class Resource < MsRestAzure::Resource @@ -39,6 +39,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -60,6 +61,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_availability.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_availability.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_definition.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_definition.rb old mode 100755 new mode 100644 index dac5ed9a81..a7b0a4101e --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_definition.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_definition.rb @@ -8,7 +8,7 @@ module Models # # Metadata for the metrics. # - class ResourceMetricDefinition < MsRestAzure::Resource + class ResourceMetricDefinition < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -58,6 +58,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -70,34 +71,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, resource_metric_definition_name: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_definition_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_definition_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_name.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_name.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_property.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_property.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_value.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_metric_value.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_name_availability.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_name_availability.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_name_availability_request.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_name_availability_request.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_scope_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_scope_type.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/restore_request.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/restore_request.rb old mode 100755 new mode 100644 index 9294cb7392..4f302cedc3 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/restore_request.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/restore_request.rb @@ -8,7 +8,7 @@ module Models # # Description of a restore request. # - class RestoreRequest < MsRestAzure::Resource + class RestoreRequest < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -39,8 +39,13 @@ class RestoreRequest < MsRestAzure::Resource # conflicts during the operation. Default value: false . attr_accessor :ignore_conflicting_host_names + # @return [Boolean] Ignore the databases and only restore the site + # content. Default value: false . + attr_accessor :ignore_databases + # @return [BackupRestoreOperationType] Operation type. Possible values - # include: 'Default', 'Clone', 'Relocation'. Default value: 'Default' . + # include: 'Default', 'Clone', 'Relocation', 'Snapshot'. Default value: + # 'Default' . attr_accessor :operation_type # @return [Boolean] true if SiteConfig.ConnectionStrings @@ -74,6 +79,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -86,34 +92,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, storage_account_url: { required: false, serialized_name: 'properties.storageAccountUrl', @@ -165,6 +151,14 @@ def self.mapper() name: 'Boolean' } }, + ignore_databases: { + required: false, + serialized_name: 'properties.ignoreDatabases', + default_value: false, + type: { + name: 'Boolean' + } + }, operation_type: { required: false, serialized_name: 'properties.operationType', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/restore_response.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/restore_response.rb old mode 100755 new mode 100644 index 50e603f94f..7a72a68023 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/restore_response.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/restore_response.rb @@ -8,7 +8,7 @@ module Models # # Response for an app restore request. # - class RestoreResponse < MsRestAzure::Resource + class RestoreResponse < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -40,6 +40,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -52,34 +53,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, operation_id: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/route_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/route_type.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/scm_type.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/scm_type.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/service_specification.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/service_specification.rb new file mode 100644 index 0000000000..6604b76098 --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/service_specification.rb @@ -0,0 +1,54 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Model object. + # + # + class ServiceSpecification + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] + attr_accessor :metric_specifications + + + # + # Mapper for ServiceSpecification class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'ServiceSpecification', + type: { + name: 'Composite', + class_name: 'ServiceSpecification', + model_properties: { + metric_specifications: { + required: false, + serialized_name: 'metricSpecifications', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'MetricSpecificationElementType', + type: { + name: 'Composite', + class_name: 'MetricSpecification' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site.rb old mode 100755 new mode 100644 index a3ffe2d9cb..4c9fe5f1a0 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site.rb @@ -64,9 +64,6 @@ class Site < MsRestAzure::Resource # the app. Read-only. attr_accessor :traffic_manager_host_names - # @return [Boolean] Indicates whether app is deployed as a premium app. - attr_accessor :premium_app_deployed - # @return [Boolean] true to stop SCM (KUDU) site when the # app is stopped; otherwise, false. The default is # false. Default value: false . @@ -80,13 +77,6 @@ class Site < MsRestAzure::Resource # the app. attr_accessor :hosting_environment_profile - # @return [String] Micro services like apps, logic apps. Default value: - # 'WebSites' . - attr_accessor :micro_service - - # @return [String] Name of gateway app associated with the app. - attr_accessor :gateway_site_name - # @return [Boolean] true to enable client affinity; # false to stop sending session affinity cookies, which # route client requests in the same session to the same instance. Default @@ -142,6 +132,16 @@ class Site < MsRestAzure::Resource # operation. attr_accessor :slot_swap_status + # @return [Boolean] Indicates whether app is deployed as a premium app. + attr_accessor :premium_app_deployed + + # @return [String] Micro services like apps, logic apps. Default value: + # 'WebSites' . + attr_accessor :micro_service + + # @return [String] Name of gateway app associated with the app. + attr_accessor :gateway_site_name + # # Mapper for Site class as Ruby Hash. @@ -165,6 +165,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -186,6 +187,7 @@ def self.mapper() }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' @@ -337,14 +339,6 @@ def self.mapper() } } }, - premium_app_deployed: { - required: false, - read_only: true, - serialized_name: 'properties.premiumAppDeployed', - type: { - name: 'Boolean' - } - }, scm_site_also_stopped: { required: false, serialized_name: 'properties.scmSiteAlsoStopped', @@ -369,21 +363,6 @@ def self.mapper() class_name: 'HostingEnvironmentProfile' } }, - micro_service: { - required: false, - serialized_name: 'properties.microService', - default_value: 'WebSites', - type: { - name: 'String' - } - }, - gateway_site_name: { - required: false, - serialized_name: 'properties.gatewaySiteName', - type: { - name: 'String' - } - }, client_affinity_enabled: { required: false, serialized_name: 'properties.clientAffinityEnabled', @@ -483,6 +462,29 @@ def self.mapper() name: 'Composite', class_name: 'SlotSwapStatus' } + }, + premium_app_deployed: { + required: false, + read_only: true, + serialized_name: 'properties.premiumAppDeployed', + type: { + name: 'Boolean' + } + }, + micro_service: { + required: false, + serialized_name: 'properties.microService', + default_value: 'WebSites', + type: { + name: 'String' + } + }, + gateway_site_name: { + required: false, + serialized_name: 'properties.gatewaySiteName', + type: { + name: 'String' + } } } } diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_auth_settings.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_auth_settings.rb old mode 100755 new mode 100644 index 0c4ac3326e..468a0141fa --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_auth_settings.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_auth_settings.rb @@ -9,7 +9,7 @@ module Models # Configuration settings for the Azure App Service Authentication / # Authorization feature. # - class SiteAuthSettings < MsRestAzure::Resource + class SiteAuthSettings < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -197,6 +197,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -209,34 +210,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, enabled: { required: false, serialized_name: 'properties.enabled', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_availability_state.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_availability_state.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_cloneability.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_cloneability.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_cloneability_criterion.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_cloneability_criterion.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config_resource.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config_resource.rb old mode 100755 new mode 100644 index 2af2b7d454..c150f89c80 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config_resource.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config_resource.rb @@ -8,7 +8,7 @@ module Models # # Web app configuration ARM resource. # - class SiteConfigResource < MsRestAzure::Resource + class SiteConfigResource < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -181,6 +181,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -193,34 +194,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, number_of_workers: { required: false, serialized_name: 'properties.numberOfWorkers', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config_resource_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_config_resource_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_configuration_snapshot_info.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_configuration_snapshot_info.rb old mode 100755 new mode 100644 index 7bca650451..8b0d0ea5c2 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_configuration_snapshot_info.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_configuration_snapshot_info.rb @@ -8,7 +8,7 @@ module Models # # A snapshot of a web app configuration. # - class SiteConfigurationSnapshotInfo < MsRestAzure::Resource + class SiteConfigurationSnapshotInfo < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -42,6 +42,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -54,34 +55,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, time: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_instance.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_instance.rb old mode 100755 new mode 100644 index 9454aa12a1..a1c333c4bd --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_instance.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_instance.rb @@ -8,7 +8,7 @@ module Models # # Instance of an app. # - class SiteInstance < MsRestAzure::Resource + class SiteInstance < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -39,6 +39,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -51,34 +52,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, site_instance_name: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_limits.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_limits.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_load_balancing.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_load_balancing.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_logs_config.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_logs_config.rb old mode 100755 new mode 100644 index 4dfd47e574..4d4df1fabf --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_logs_config.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_logs_config.rb @@ -8,7 +8,7 @@ module Models # # Configuration of App Service site logs. # - class SiteLogsConfig < MsRestAzure::Resource + class SiteLogsConfig < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -48,6 +48,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -60,34 +61,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, application_logs: { required: false, serialized_name: 'properties.applicationLogs', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_machine_key.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_machine_key.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_php_error_log_flag.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_php_error_log_flag.rb old mode 100755 new mode 100644 index 34ce470603..25618b12c9 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_php_error_log_flag.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_php_error_log_flag.rb @@ -8,7 +8,7 @@ module Models # # Used for getting PHP error logging flag. # - class SitePhpErrorLogFlag < MsRestAzure::Resource + class SitePhpErrorLogFlag < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -48,6 +48,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -60,34 +61,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, local_log_errors: { required: false, serialized_name: 'properties.localLogErrors', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_seal.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_seal.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_seal_request.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_seal_request.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_source_control.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_source_control.rb old mode 100755 new mode 100644 index c8026985e2..bc44b598a3 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_source_control.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/site_source_control.rb @@ -8,7 +8,7 @@ module Models # # Source control configuration for an app. # - class SiteSourceControl < MsRestAzure::Resource + class SiteSourceControl < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -55,6 +55,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -67,34 +68,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, repo_url: { required: false, serialized_name: 'properties.repoUrl', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_capacity.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_capacity.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_description.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_description.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_info.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_info.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_info_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_info_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_infos.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_infos.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_name.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/sku_name.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_config_names_resource.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_config_names_resource.rb old mode 100755 new mode 100644 index 2cfbe3c1c2..ca1bdefcf1 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_config_names_resource.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_config_names_resource.rb @@ -8,7 +8,7 @@ module Models # # Slot Config names azure resource. # - class SlotConfigNamesResource < MsRestAzure::Resource + class SlotConfigNamesResource < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -42,6 +42,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -54,34 +55,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, connection_string_names: { required: false, serialized_name: 'properties.connectionStringNames', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_difference.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_difference.rb old mode 100755 new mode 100644 index 5de32d0f52..82ee72f19d --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_difference.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_difference.rb @@ -8,7 +8,7 @@ module Models # # A setting difference between two deployment slots of an app. # - class SlotDifference < MsRestAzure::Resource + class SlotDifference < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -59,6 +59,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -71,34 +72,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, slot_difference_type: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_difference_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_difference_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_swap_status.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slot_swap_status.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slow_requests_based_trigger.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/slow_requests_based_trigger.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot.rb old mode 100755 new mode 100644 index 9539c708ec..bef456e3b1 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot.rb @@ -8,7 +8,7 @@ module Models # # A snapshot of an app. # - class Snapshot < MsRestAzure::Resource + class Snapshot < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -39,6 +39,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -51,34 +52,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, time: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_health_metadata.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot_recovery_request.rb old mode 100755 new mode 100644 similarity index 54% rename from management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_health_metadata.rb rename to management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot_recovery_request.rb index 44d52bdefe..7eb04ca581 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/resource_health_metadata.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot_recovery_request.rb @@ -6,35 +6,41 @@ module Azure::ARM::Web module Models # - # Used for getting ResourceHealthCheck settings. + # Details about app recovery operation. # - class ResourceHealthMetadata < MsRestAzure::Resource + class SnapshotRecoveryRequest < MsRestAzure::ProxyOnlyResource include MsRestAzure include MsRest::JSONable - # @return [String] ARM Resource Id - attr_accessor :resource_health_metadata_id + # @return [DateTime] Point in time in which the app recovery should be + # attempted. + attr_accessor :snapshot_time - # @return [String] The category that the resource matches in the RHC - # Policy File - attr_accessor :category + # @return [SnapshotRecoveryTarget] Specifies the web app that snapshot + # contents will be written to. + attr_accessor :recovery_target - # @return [Boolean] Is there a health signal for the resource - attr_accessor :signal_availability + # @return [Boolean] true if the recovery operation can + # overwrite source app; otherwise, false. + attr_accessor :overwrite + + # @return [Boolean] Site configuration, in addition to content, will be + # reverted if this is true. + attr_accessor :recover_configuration # - # Mapper for ResourceHealthMetadata class as Ruby Hash. + # Mapper for SnapshotRecoveryRequest class as Ruby Hash. # This will be used for serialization/deserialization. # def self.mapper() { required: false, - serialized_name: 'ResourceHealthMetadata', + serialized_name: 'SnapshotRecoveryRequest', type: { name: 'Composite', - class_name: 'ResourceHealthMetadata', + class_name: 'SnapshotRecoveryRequest', model_properties: { id: { required: false, @@ -46,6 +52,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -58,51 +65,39 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { + snapshot_time: { required: false, - serialized_name: 'tags', + serialized_name: 'properties.snapshotTime', type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } + name: 'DateTime' } }, - resource_health_metadata_id: { + recovery_target: { required: false, - serialized_name: 'properties.id', + serialized_name: 'properties.recoveryTarget', type: { - name: 'String' + name: 'Composite', + class_name: 'SnapshotRecoveryTarget' } }, - category: { + overwrite: { required: false, - serialized_name: 'properties.category', + serialized_name: 'properties.overwrite', type: { - name: 'String' + name: 'Boolean' } }, - signal_availability: { + recover_configuration: { required: false, - serialized_name: 'properties.signalAvailability', + serialized_name: 'properties.recoverConfiguration', type: { name: 'Boolean' } diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot_recovery_target.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot_recovery_target.rb new file mode 100644 index 0000000000..3d0471f8bb --- /dev/null +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/snapshot_recovery_target.rb @@ -0,0 +1,60 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Web + module Models + # + # Specifies the web app that snapshot contents will be written to. + # + class SnapshotRecoveryTarget + + include MsRestAzure + + include MsRest::JSONable + # @return [String] Geographical location of the target web app, e.g. + # SouthEastAsia, SouthCentralUS + attr_accessor :location + + # @return [String] ARM resource ID of the target app. + # /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} + # for production slots and + # /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} + # for other slots. + attr_accessor :id + + + # + # Mapper for SnapshotRecoveryTarget class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'SnapshotRecoveryTarget', + type: { + name: 'Composite', + class_name: 'SnapshotRecoveryTarget', + model_properties: { + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/source_control.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/source_control.rb old mode 100755 new mode 100644 index 19b35330af..98882133a4 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/source_control.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/source_control.rb @@ -8,7 +8,7 @@ module Models # # The source control OAuth token. # - class SourceControl < MsRestAzure::Resource + class SourceControl < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -51,6 +51,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -63,34 +64,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, source_control_name: { required: false, serialized_name: 'properties.name', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/source_control_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/source_control_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/ssl_state.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/ssl_state.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/stamp_capacity.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/stamp_capacity.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/stamp_capacity_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/stamp_capacity_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/status_codes_based_trigger.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/status_codes_based_trigger.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/status_options.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/status_options.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/storage_migration_options.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/storage_migration_options.rb old mode 100755 new mode 100644 index f0b043afd4..b287b17b15 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/storage_migration_options.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/storage_migration_options.rb @@ -8,7 +8,7 @@ module Models # # Options for app content migration. # - class StorageMigrationOptions < MsRestAzure::Resource + class StorageMigrationOptions < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -51,6 +51,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -63,34 +64,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, azurefiles_connection_string: { required: false, serialized_name: 'properties.azurefilesConnectionString', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/storage_migration_response.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/storage_migration_response.rb old mode 100755 new mode 100644 index 9c8620d690..fa92f86bbf --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/storage_migration_response.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/storage_migration_response.rb @@ -8,7 +8,7 @@ module Models # # Response for a migration of app content request. # - class StorageMigrationResponse < MsRestAzure::Resource + class StorageMigrationResponse < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -40,6 +40,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -52,34 +53,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, operation_id: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/string_dictionary.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/string_dictionary.rb old mode 100755 new mode 100644 index a4bc740378..9fbae777d4 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/string_dictionary.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/string_dictionary.rb @@ -8,7 +8,7 @@ module Models # # String dictionary resource. # - class StringDictionary < MsRestAzure::Resource + class StringDictionary < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -39,6 +39,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -51,34 +52,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, properties: { required: false, serialized_name: 'properties', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/tld_legal_agreement.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/tld_legal_agreement.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/tld_legal_agreement_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/tld_legal_agreement_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain.rb old mode 100755 new mode 100644 index bb7cf58f0f..84dd2193c0 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain.rb @@ -8,7 +8,7 @@ module Models # # A top level domain object. # - class TopLevelDomain < MsRestAzure::Resource + class TopLevelDomain < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -43,6 +43,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -55,34 +56,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, domain_name: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain_agreement_option.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain_agreement_option.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/top_level_domain_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/unauthenticated_client_action.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/unauthenticated_client_action.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage.rb old mode 100755 new mode 100644 index 67a1e3756e..4a15311a93 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage.rb @@ -8,7 +8,7 @@ module Models # # Usage of the quota resource. # - class Usage < MsRestAzure::Resource + class Usage < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -64,6 +64,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -76,34 +77,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, display_name: { required: false, read_only: true, diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage_state.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/usage_state.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/user.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/user.rb old mode 100755 new mode 100644 index 99cf3dc3d2..89b75f87f6 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/user.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/user.rb @@ -8,7 +8,7 @@ module Models # # User crendentials used for publishing activity. # - class User < MsRestAzure::Resource + class User < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -51,6 +51,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -63,34 +64,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, user_name: { required: false, serialized_name: 'properties.name', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_request.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_request.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_resource_types.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_resource_types.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_response.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_response.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_response_error.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/validate_response_error.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_application.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_application.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_directory.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_directory.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_ipmapping.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_ipmapping.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_network_profile.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/virtual_network_profile.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_gateway.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_gateway.rb old mode 100755 new mode 100644 index 610cf06f5b..76cd363fa5 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_gateway.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_gateway.rb @@ -9,7 +9,7 @@ module Models # The Virtual Network gateway contract. This is used to give the Virtual # Network gateway access to the VPN package. # - class VnetGateway < MsRestAzure::Resource + class VnetGateway < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -43,6 +43,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -55,34 +56,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, vnet_name: { required: false, serialized_name: 'properties.vnetName', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_info.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_info.rb old mode 100755 new mode 100644 index 038b45a8fe..d280365c73 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_info.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_info.rb @@ -8,7 +8,7 @@ module Models # # Virtual Network information contract. # - class VnetInfo + class VnetInfo < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -49,9 +49,40 @@ def self.mapper() name: 'Composite', class_name: 'VnetInfo', model_properties: { + id: { + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + kind: { + required: false, + serialized_name: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, vnet_resource_id: { required: false, - serialized_name: 'vnetResourceId', + serialized_name: 'properties.vnetResourceId', type: { name: 'String' } @@ -59,14 +90,14 @@ def self.mapper() cert_thumbprint: { required: false, read_only: true, - serialized_name: 'certThumbprint', + serialized_name: 'properties.certThumbprint', type: { name: 'String' } }, cert_blob: { required: false, - serialized_name: 'certBlob', + serialized_name: 'properties.certBlob', type: { name: 'String' } @@ -74,7 +105,7 @@ def self.mapper() routes: { required: false, read_only: true, - serialized_name: 'routes', + serialized_name: 'properties.routes', type: { name: 'Sequence', element: { @@ -90,14 +121,14 @@ def self.mapper() resync_required: { required: false, read_only: true, - serialized_name: 'resyncRequired', + serialized_name: 'properties.resyncRequired', type: { name: 'Boolean' } }, dns_servers: { required: false, - serialized_name: 'dnsServers', + serialized_name: 'properties.dnsServers', type: { name: 'String' } diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_route.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_route.rb old mode 100755 new mode 100644 index 5a4438d3e7..5175ed3f43 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_route.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/vnet_route.rb @@ -9,7 +9,7 @@ module Models # Virtual Network route contract used to pass routing information for a # Virtual Network. # - class VnetRoute < MsRestAzure::Resource + class VnetRoute < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -61,6 +61,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -73,34 +74,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, vnet_route_name: { required: false, serialized_name: 'properties.name', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_app_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_app_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_app_instance_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/web_app_instance_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool_collection.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool_collection.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool_resource.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool_resource.rb old mode 100755 new mode 100644 index d8c60c0efe..dc2546611b --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool_resource.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_pool_resource.rb @@ -8,7 +8,7 @@ module Models # # Worker pool of an App Service Environment ARM resource. # - class WorkerPoolResource < MsRestAzure::Resource + class WorkerPoolResource < MsRestAzure::ProxyOnlyResource include MsRestAzure @@ -56,6 +56,7 @@ def self.mapper() }, name: { required: false, + read_only: true, serialized_name: 'name', type: { name: 'String' @@ -68,34 +69,14 @@ def self.mapper() name: 'String' } }, - location: { - required: true, - serialized_name: 'location', - type: { - name: 'String' - } - }, type: { required: false, + read_only: true, serialized_name: 'type', type: { name: 'String' } }, - tags: { - required: false, - serialized_name: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, worker_size_id: { required: false, serialized_name: 'properties.workerSizeId', diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_size_options.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/models/worker_size_options.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/module_definition.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/module_definition.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/provider.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/provider.rb old mode 100755 new mode 100644 index fcfcf3c969..8d9e180e27 --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/provider.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/provider.rb @@ -98,6 +98,81 @@ def get_available_stacks_async(custom_headers = nil) promise.execute end + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_operations(custom_headers = nil) + first_page = list_operations_as_lazy(custom_headers) + first_page.get_all_items + end + + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_operations_with_http_info(custom_headers = nil) + list_operations_async(custom_headers).value! + end + + # + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_operations_async(custom_headers = nil) + api_version = '2016-03-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'providers/Microsoft.Web/operations' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::CsmOperationCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + # # Get available application frameworks and their versions # @@ -177,5 +252,104 @@ def get_available_stacks_on_prem_async(custom_headers = nil) promise.execute end + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CsmOperationCollection] operation results. + # + def list_operations_next(next_page_link, custom_headers = nil) + response = list_operations_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_operations_next_with_http_info(next_page_link, custom_headers = nil) + list_operations_next_async(next_page_link, custom_headers).value! + end + + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_operations_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::CsmOperationCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CsmOperationCollection] which provide lazy access to pages of the + # response. + # + def list_operations_as_lazy(custom_headers = nil) + response = list_operations_async(custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_operations_next_async(next_page_link, custom_headers) + end + page + end + end + end end diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/recommendations.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/recommendations.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/top_level_domains.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/top_level_domains.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/version.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/version.rb old mode 100755 new mode 100644 diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/web_apps.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/web_apps.rb old mode 100755 new mode 100644 index e0f6bb81bb..f074acd40d --- a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/web_apps.rb +++ b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/web_apps.rb @@ -5046,54 +5046,54 @@ def update_domain_ownership_identifier_async(resource_group_name, name, domain_o end # - # Get hostname bindings for an app or a deployment slot. + # Invoke the MSDeploy web app extension as pass-through API # - # Get hostname bindings for an app or a deployment slot. + # Invoke the MSDeploy web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Name of web app # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [MSDeployStatus] operation results. # - def list_host_name_bindings(resource_group_name, name, custom_headers = nil) - first_page = list_host_name_bindings_as_lazy(resource_group_name, name, custom_headers) - first_page.get_all_items + def get_msdeploy_status(resource_group_name, name, custom_headers = nil) + response = get_msdeploy_status_async(resource_group_name, name, custom_headers).value! + response.body unless response.nil? end # - # Get hostname bindings for an app or a deployment slot. + # Invoke the MSDeploy web app extension as pass-through API # - # Get hostname bindings for an app or a deployment slot. + # Invoke the MSDeploy web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Name of web app # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_host_name_bindings_with_http_info(resource_group_name, name, custom_headers = nil) - list_host_name_bindings_async(resource_group_name, name, custom_headers).value! + def get_msdeploy_status_with_http_info(resource_group_name, name, custom_headers = nil) + get_msdeploy_status_async(resource_group_name, name, custom_headers).value! end # - # Get hostname bindings for an app or a deployment slot. + # Invoke the MSDeploy web app extension as pass-through API # - # Get hostname bindings for an app or a deployment slot. + # Invoke the MSDeploy web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Name of web app # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_host_name_bindings_async(resource_group_name, name, custom_headers = nil) + def get_msdeploy_status_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -5105,7 +5105,7 @@ def list_host_name_bindings_async(resource_group_name, name, custom_headers = ni # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy' request_url = @base_url || @client.base_url @@ -5132,7 +5132,7 @@ def list_host_name_bindings_async(resource_group_name, name, custom_headers = ni if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HostNameBindingCollection.mapper() + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -5146,60 +5146,104 @@ def list_host_name_bindings_async(resource_group_name, name, custom_headers = ni end # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Invoke the MSDeploy web app extension as pass-through API # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Invoke the MSDeploy web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. + # @param name [String] Name of web app + # @param msdeploy [MSDeploy] Details of MSDeploy operation # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HostNameBinding] operation results. + # @return [MSDeployStatus] operation results. # - def get_host_name_binding(resource_group_name, name, host_name, custom_headers = nil) - response = get_host_name_binding_async(resource_group_name, name, host_name, custom_headers).value! + def create_msdeploy_operation(resource_group_name, name, msdeploy, custom_headers = nil) + response = create_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers).value! response.body unless response.nil? end # - # Get the named hostname binding for an app (or deployment slot, if specified). + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param msdeploy [MSDeploy] Details of MSDeploy operation + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. # - # Get the named hostname binding for an app (or deployment slot, if specified). + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers = nil) + # Send request + promise = begin_create_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Invoke the MSDeploy Log web app extension as pass-through API + # + # Invoke the MSDeploy Log web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. + # @param name [String] Name of web app + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MSDeployLog] operation results. + # + def get_msdeploy_log(resource_group_name, name, custom_headers = nil) + response = get_msdeploy_log_async(resource_group_name, name, custom_headers).value! + response.body unless response.nil? + end + + # + # Invoke the MSDeploy Log web app extension as pass-through API + # + # Invoke the MSDeploy Log web app extension as pass-through API + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_host_name_binding_with_http_info(resource_group_name, name, host_name, custom_headers = nil) - get_host_name_binding_async(resource_group_name, name, host_name, custom_headers).value! + def get_msdeploy_log_with_http_info(resource_group_name, name, custom_headers = nil) + get_msdeploy_log_async(resource_group_name, name, custom_headers).value! end # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Invoke the MSDeploy Log web app extension as pass-through API # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Invoke the MSDeploy Log web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. + # @param name [String] Name of web app # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_host_name_binding_async(resource_group_name, name, host_name, custom_headers = nil) + def get_msdeploy_log_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -5209,13 +5253,13 @@ def get_host_name_binding_async(resource_group_name, name, host_name, custom_hea # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -5236,7 +5280,7 @@ def get_host_name_binding_async(resource_group_name, name, host_name, custom_hea if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() + result_mapper = Azure::ARM::Web::Models::MSDeployLog.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -5250,67 +5294,56 @@ def get_host_name_binding_async(resource_group_name, name, host_name, custom_hea end # - # Creates a hostname binding for an app. + # Fetch a short lived token that can be exchanged for a master key. # - # Creates a hostname binding for an app. + # Fetch a short lived token that can be exchanged for a master key. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. - # @param host_name_binding [HostNameBinding] Binding details. This is the JSON - # representation of a HostNameBinding object. + # @param name [String] Name of web app # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HostNameBinding] operation results. + # @return [String] operation results. # - def create_or_update_host_name_binding(resource_group_name, name, host_name, host_name_binding, custom_headers = nil) - response = create_or_update_host_name_binding_async(resource_group_name, name, host_name, host_name_binding, custom_headers).value! + def get_functions_admin_token(resource_group_name, name, custom_headers = nil) + response = get_functions_admin_token_async(resource_group_name, name, custom_headers).value! response.body unless response.nil? end # - # Creates a hostname binding for an app. + # Fetch a short lived token that can be exchanged for a master key. # - # Creates a hostname binding for an app. + # Fetch a short lived token that can be exchanged for a master key. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. - # @param host_name_binding [HostNameBinding] Binding details. This is the JSON - # representation of a HostNameBinding object. + # @param name [String] Name of web app # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_host_name_binding_with_http_info(resource_group_name, name, host_name, host_name_binding, custom_headers = nil) - create_or_update_host_name_binding_async(resource_group_name, name, host_name, host_name_binding, custom_headers).value! + def get_functions_admin_token_with_http_info(resource_group_name, name, custom_headers = nil) + get_functions_admin_token_async(resource_group_name, name, custom_headers).value! end # - # Creates a hostname binding for an app. + # Fetch a short lived token that can be exchanged for a master key. # - # Creates a hostname binding for an app. + # Fetch a short lived token that can be exchanged for a master key. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. - # @param host_name_binding [HostNameBinding] Binding details. This is the JSON - # representation of a HostNameBinding object. + # @param name [String] Name of web app # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_host_name_binding_async(resource_group_name, name, host_name, host_name_binding, custom_headers = nil) + def get_functions_admin_token_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'host_name is nil' if host_name.nil? - fail ArgumentError, 'host_name_binding is nil' if host_name_binding.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -5320,27 +5353,18 @@ def create_or_update_host_name_binding_async(resource_group_name, name, host_nam # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() - request_content = @client.serialize(request_mapper, host_name_binding) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:put, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -5356,7 +5380,13 @@ def create_or_update_host_name_binding_async(resource_group_name, name, host_nam if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() + result_mapper = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'String' + } + } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -5370,59 +5400,56 @@ def create_or_update_host_name_binding_async(resource_group_name, name, host_nam end # - # Deletes a hostname binding for an app. + # Get hostname bindings for an app or a deployment slot. # - # Deletes a hostname binding for an app. + # Get hostname bindings for an app or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [Array] operation results. # - def delete_host_name_binding(resource_group_name, name, host_name, custom_headers = nil) - response = delete_host_name_binding_async(resource_group_name, name, host_name, custom_headers).value! - nil + def list_host_name_bindings(resource_group_name, name, custom_headers = nil) + first_page = list_host_name_bindings_as_lazy(resource_group_name, name, custom_headers) + first_page.get_all_items end # - # Deletes a hostname binding for an app. + # Get hostname bindings for an app or a deployment slot. # - # Deletes a hostname binding for an app. + # Get hostname bindings for an app or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_host_name_binding_with_http_info(resource_group_name, name, host_name, custom_headers = nil) - delete_host_name_binding_async(resource_group_name, name, host_name, custom_headers).value! + def list_host_name_bindings_with_http_info(resource_group_name, name, custom_headers = nil) + list_host_name_bindings_async(resource_group_name, name, custom_headers).value! end # - # Deletes a hostname binding for an app. + # Get hostname bindings for an app or a deployment slot. # - # Deletes a hostname binding for an app. + # Get hostname bindings for an app or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_host_name_binding_async(resource_group_name, name, host_name, custom_headers = nil) + def list_host_name_bindings_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -5432,29 +5459,39 @@ def delete_host_name_binding_async(resource_group_name, name, host_name, custom_ # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::HostNameBindingCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -5463,64 +5500,60 @@ def delete_host_name_binding_async(resource_group_name, name, host_name, custom_ end # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Get the named hostname binding for an app (or deployment slot, if specified). # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Get the named hostname binding for an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection + # @param name [String] Name of the app. + # @param host_name [String] Hostname in the hostname binding. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HybridConnection] operation results. + # @return [HostNameBinding] operation results. # - def get_hybrid_connection(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) - response = get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! + def get_host_name_binding(resource_group_name, name, host_name, custom_headers = nil) + response = get_host_name_binding_async(resource_group_name, name, host_name, custom_headers).value! response.body unless response.nil? end # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Get the named hostname binding for an app (or deployment slot, if specified). # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Get the named hostname binding for an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection + # @param name [String] Name of the app. + # @param host_name [String] Hostname in the hostname binding. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) - get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! + def get_host_name_binding_with_http_info(resource_group_name, name, host_name, custom_headers = nil) + get_host_name_binding_async(resource_group_name, name, host_name, custom_headers).value! end # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Get the named hostname binding for an app (or deployment slot, if specified). # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Get the named hostname binding for an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection + # @param name [String] Name of the app. + # @param host_name [String] Hostname in the hostname binding. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) + def get_host_name_binding_async(resource_group_name, name, host_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, 'relay_name is nil' if relay_name.nil? + fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -5530,13 +5563,13 @@ def get_hybrid_connection_async(resource_group_name, name, namespace_name, relay # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -5557,7 +5590,7 @@ def get_hybrid_connection_async(resource_group_name, name, namespace_name, relay if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + result_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -5571,71 +5604,67 @@ def get_hybrid_connection_async(resource_group_name, name, namespace_name, relay end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Creates a hostname binding for an app. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Creates a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection + # @param name [String] Name of the app. + # @param host_name [String] Hostname in the hostname binding. + # @param host_name_binding [HostNameBinding] Binding details. This is the JSON + # representation of a HostNameBinding object. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HybridConnection] operation results. + # @return [HostNameBinding] operation results. # - def create_or_update_hybrid_connection(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) - response = create_or_update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers).value! + def create_or_update_host_name_binding(resource_group_name, name, host_name, host_name_binding, custom_headers = nil) + response = create_or_update_host_name_binding_async(resource_group_name, name, host_name, host_name_binding, custom_headers).value! response.body unless response.nil? end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Creates a hostname binding for an app. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Creates a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection + # @param name [String] Name of the app. + # @param host_name [String] Hostname in the hostname binding. + # @param host_name_binding [HostNameBinding] Binding details. This is the JSON + # representation of a HostNameBinding object. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) - create_or_update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers).value! + def create_or_update_host_name_binding_with_http_info(resource_group_name, name, host_name, host_name_binding, custom_headers = nil) + create_or_update_host_name_binding_async(resource_group_name, name, host_name, host_name_binding, custom_headers).value! end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Creates a hostname binding for an app. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Creates a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection + # @param name [String] Name of the app. + # @param host_name [String] Hostname in the hostname binding. + # @param host_name_binding [HostNameBinding] Binding details. This is the JSON + # representation of a HostNameBinding object. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) + def create_or_update_host_name_binding_async(resource_group_name, name, host_name, host_name_binding, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, 'relay_name is nil' if relay_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'host_name is nil' if host_name.nil? + fail ArgumentError, 'host_name_binding is nil' if host_name_binding.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -5649,17 +5678,17 @@ def create_or_update_hybrid_connection_async(resource_group_name, name, namespac request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) + request_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() + request_content = @client.serialize(request_mapper, host_name_binding) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), @@ -5681,7 +5710,7 @@ def create_or_update_hybrid_connection_async(resource_group_name, name, namespac if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + result_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -5695,63 +5724,59 @@ def create_or_update_hybrid_connection_async(resource_group_name, name, namespac end # - # Removes a Hybrid Connection from this site. + # Deletes a hostname binding for an app. # - # Removes a Hybrid Connection from this site. + # Deletes a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection + # @param name [String] Name of the app. + # @param host_name [String] Hostname in the hostname binding. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # - def delete_hybrid_connection(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) - response = delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! + def delete_host_name_binding(resource_group_name, name, host_name, custom_headers = nil) + response = delete_host_name_binding_async(resource_group_name, name, host_name, custom_headers).value! nil end # - # Removes a Hybrid Connection from this site. + # Deletes a hostname binding for an app. # - # Removes a Hybrid Connection from this site. + # Deletes a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection + # @param name [String] Name of the app. + # @param host_name [String] Hostname in the hostname binding. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) - delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! + def delete_host_name_binding_with_http_info(resource_group_name, name, host_name, custom_headers = nil) + delete_host_name_binding_async(resource_group_name, name, host_name, custom_headers).value! end # - # Removes a Hybrid Connection from this site. + # Deletes a hostname binding for an app. # - # Removes a Hybrid Connection from this site. + # Deletes a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection + # @param name [String] Name of the app. + # @param host_name [String] Hostname in the hostname binding. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) + def delete_host_name_binding_async(resource_group_name, name, host_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, 'relay_name is nil' if relay_name.nil? + fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -5761,13 +5786,13 @@ def delete_hybrid_connection_async(resource_group_name, name, namespace_name, re # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -5778,7 +5803,7 @@ def delete_hybrid_connection_async(resource_group_name, name, namespace_name, re http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 404 + unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -5792,71 +5817,64 @@ def delete_hybrid_connection_async(resource_group_name, name, namespace_name, re end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] The name of the web app # @param namespace_name [String] The namespace for this hybrid connection # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [HybridConnection] operation results. # - def update_hybrid_connection(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) - response = update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers).value! + def get_hybrid_connection(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) + response = get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! response.body unless response.nil? end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] The name of the web app # @param namespace_name [String] The namespace for this hybrid connection # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) - update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers).value! + def get_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) + get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] The name of the web app # @param namespace_name [String] The namespace for this hybrid connection # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) + def get_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, 'relay_name is nil' if relay_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -5866,14 +5884,6 @@ def update_hybrid_connection_async(resource_group_name, name, namespace_name, re # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url @@ -5882,11 +5892,10 @@ def update_hybrid_connection_async(resource_group_name, name, namespace_name, re middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:patch, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -5916,64 +5925,71 @@ def update_hybrid_connection_async(resource_group_name, name, namespace_name, re end # - # Gets the send key name and value for a Hybrid Connection. + # Creates a new Hybrid Connection using a Service Bus relay. # - # Gets the send key name and value for a Hybrid Connection. + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] The name of the web app # @param namespace_name [String] The namespace for this hybrid connection # @param relay_name [String] The relay name for this hybrid connection + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HybridConnectionKey] operation results. + # @return [HybridConnection] operation results. # - def list_hybrid_connection_keys(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) - response = list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! + def create_or_update_hybrid_connection(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) + response = create_or_update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers).value! response.body unless response.nil? end # - # Gets the send key name and value for a Hybrid Connection. + # Creates a new Hybrid Connection using a Service Bus relay. # - # Gets the send key name and value for a Hybrid Connection. + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] The name of the web app # @param namespace_name [String] The namespace for this hybrid connection # @param relay_name [String] The relay name for this hybrid connection + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_hybrid_connection_keys_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) - list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! + def create_or_update_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) + create_or_update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers).value! end # - # Gets the send key name and value for a Hybrid Connection. + # Creates a new Hybrid Connection using a Service Bus relay. # - # Gets the send key name and value for a Hybrid Connection. + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] The name of the web app # @param namespace_name [String] The namespace for this hybrid connection # @param relay_name [String] The relay name for this hybrid connection + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) + def create_or_update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? fail ArgumentError, 'relay_name is nil' if relay_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -5983,7 +5999,15 @@ def list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url @@ -5991,10 +6015,11 @@ def list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -6010,7 +6035,7 @@ def list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HybridConnectionKey.mapper() + result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -6024,56 +6049,63 @@ def list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, end # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Removes a Hybrid Connection from this site. # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Removes a Hybrid Connection from this site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HybridConnection] operation results. # - def list_hybrid_connections(resource_group_name, name, custom_headers = nil) - response = list_hybrid_connections_async(resource_group_name, name, custom_headers).value! - response.body unless response.nil? + def delete_hybrid_connection(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) + response = delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! + nil end # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Removes a Hybrid Connection from this site. # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Removes a Hybrid Connection from this site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_hybrid_connections_with_http_info(resource_group_name, name, custom_headers = nil) - list_hybrid_connections_async(resource_group_name, name, custom_headers).value! + def delete_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) + delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! end # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Removes a Hybrid Connection from this site. # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Removes a Hybrid Connection from this site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_hybrid_connections_async(resource_group_name, name, custom_headers = nil) + def delete_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -6083,39 +6115,29 @@ def list_hybrid_connections_async(resource_group_name, name, custom_headers = ni # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -6124,62 +6146,71 @@ def list_hybrid_connections_async(resource_group_name, name, custom_headers = ni end # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # Creates a new Hybrid Connection using a Service Bus relay. # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RelayServiceConnectionEntity] operation results. + # @return [HybridConnection] operation results. # - def list_relay_service_connections(resource_group_name, name, custom_headers = nil) - response = list_relay_service_connections_async(resource_group_name, name, custom_headers).value! + def update_hybrid_connection(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) + response = update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers).value! response.body unless response.nil? end # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # Creates a new Hybrid Connection using a Service Bus relay. # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_relay_service_connections_with_http_info(resource_group_name, name, custom_headers = nil) - list_relay_service_connections_async(resource_group_name, name, custom_headers).value! + def update_hybrid_connection_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) + update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers).value! end # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # Creates a new Hybrid Connection using a Service Bus relay. # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_relay_service_connections_async(resource_group_name, name, custom_headers = nil) + def update_hybrid_connection_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -6189,18 +6220,27 @@ def list_relay_service_connections_async(resource_group_name, name, custom_heade # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response @@ -6216,7 +6256,7 @@ def list_relay_service_connections_async(resource_group_name, name, custom_heade if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -6230,60 +6270,64 @@ def list_relay_service_connections_async(resource_group_name, name, custom_heade end # - # Gets a hybrid connection configuration by its name. + # Gets the send key name and value for a Hybrid Connection. # - # Gets a hybrid connection configuration by its name. + # Gets the send key name and value for a Hybrid Connection. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RelayServiceConnectionEntity] operation results. + # @return [HybridConnectionKey] operation results. # - def get_relay_service_connection(resource_group_name, name, entity_name, custom_headers = nil) - response = get_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers).value! + def list_hybrid_connection_keys(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) + response = list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! response.body unless response.nil? end # - # Gets a hybrid connection configuration by its name. + # Gets the send key name and value for a Hybrid Connection. # - # Gets a hybrid connection configuration by its name. + # Gets the send key name and value for a Hybrid Connection. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_relay_service_connection_with_http_info(resource_group_name, name, entity_name, custom_headers = nil) - get_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers).value! + def list_hybrid_connection_keys_with_http_info(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) + list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers).value! end # - # Gets a hybrid connection configuration by its name. + # Gets the send key name and value for a Hybrid Connection. # - # Gets a hybrid connection configuration by its name. + # Gets the send key name and value for a Hybrid Connection. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers = nil) + def list_hybrid_connection_keys_async(resource_group_name, name, namespace_name, relay_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'entity_name is nil' if entity_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -6293,18 +6337,18 @@ def get_relay_service_connection_async(resource_group_name, name, entity_name, c # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -6320,7 +6364,7 @@ def get_relay_service_connection_async(resource_group_name, name, entity_name, c if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + result_mapper = Azure::ARM::Web::Models::HybridConnectionKey.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -6334,73 +6378,56 @@ def get_relay_service_connection_async(resource_group_name, name, entity_name, c end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Retrieves all Service Bus Hybrid Connections used by this Web App. # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Retrieves all Service Bus Hybrid Connections used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. + # @param name [String] The name of the web app # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RelayServiceConnectionEntity] operation results. + # @return [HybridConnection] operation results. # - def create_or_update_relay_service_connection(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) - response = create_or_update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers).value! + def list_hybrid_connections(resource_group_name, name, custom_headers = nil) + response = list_hybrid_connections_async(resource_group_name, name, custom_headers).value! response.body unless response.nil? end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Retrieves all Service Bus Hybrid Connections used by this Web App. # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Retrieves all Service Bus Hybrid Connections used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. + # @param name [String] The name of the web app # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_relay_service_connection_with_http_info(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) - create_or_update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers).value! + def list_hybrid_connections_with_http_info(resource_group_name, name, custom_headers = nil) + list_hybrid_connections_async(resource_group_name, name, custom_headers).value! end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Retrieves all Service Bus Hybrid Connections used by this Web App. # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Retrieves all Service Bus Hybrid Connections used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. + # @param name [String] The name of the web app # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) + def list_hybrid_connections_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'entity_name is nil' if entity_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -6410,27 +6437,18 @@ def create_or_update_relay_service_connection_async(resource_group_name, name, e # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:put, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -6446,7 +6464,7 @@ def create_or_update_relay_service_connection_async(resource_group_name, name, e if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -6460,59 +6478,62 @@ def create_or_update_relay_service_connection_async(resource_group_name, name, e end # - # Deletes a relay service connection by its name. + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # - # Deletes a relay service connection by its name. + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [RelayServiceConnectionEntity] operation results. # - def delete_relay_service_connection(resource_group_name, name, entity_name, custom_headers = nil) - response = delete_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers).value! - nil + def list_relay_service_connections(resource_group_name, name, custom_headers = nil) + response = list_relay_service_connections_async(resource_group_name, name, custom_headers).value! + response.body unless response.nil? end # - # Deletes a relay service connection by its name. + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # - # Deletes a relay service connection by its name. + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_relay_service_connection_with_http_info(resource_group_name, name, entity_name, custom_headers = nil) - delete_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers).value! + def list_relay_service_connections_with_http_info(resource_group_name, name, custom_headers = nil) + list_relay_service_connections_async(resource_group_name, name, custom_headers).value! end # - # Deletes a relay service connection by its name. + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # - # Deletes a relay service connection by its name. + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers = nil) + def list_relay_service_connections_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'entity_name is nil' if entity_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -6522,29 +6543,39 @@ def delete_relay_service_connection_async(resource_group_name, name, entity_name # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 404 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -6553,73 +6584,60 @@ def delete_relay_service_connection_async(resource_group_name, name, entity_name end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Gets a hybrid connection configuration by its name. # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Gets a hybrid connection configuration by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. + # @param entity_name [String] Name of the hybrid connection. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [RelayServiceConnectionEntity] operation results. # - def update_relay_service_connection(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) - response = update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers).value! + def get_relay_service_connection(resource_group_name, name, entity_name, custom_headers = nil) + response = get_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers).value! response.body unless response.nil? end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Gets a hybrid connection configuration by its name. # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Gets a hybrid connection configuration by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. + # @param entity_name [String] Name of the hybrid connection. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_relay_service_connection_with_http_info(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) - update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers).value! + def get_relay_service_connection_with_http_info(resource_group_name, name, entity_name, custom_headers = nil) + get_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers).value! end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Gets a hybrid connection configuration by its name. # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Gets a hybrid connection configuration by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. + # @param entity_name [String] Name of the hybrid connection. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) + def get_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'entity_name is nil' if entity_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -6629,14 +6647,6 @@ def update_relay_service_connection_async(resource_group_name, name, entity_name # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url @@ -6645,11 +6655,10 @@ def update_relay_service_connection_async(resource_group_name, name, entity_name middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:patch, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -6679,56 +6688,73 @@ def update_relay_service_connection_async(resource_group_name, name, entity_name end # - # Gets all scale-out instances of an app. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Gets all scale-out instances of an app. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [RelayServiceConnectionEntity] operation results. # - def list_instance_identifiers(resource_group_name, name, custom_headers = nil) - first_page = list_instance_identifiers_as_lazy(resource_group_name, name, custom_headers) - first_page.get_all_items + def create_or_update_relay_service_connection(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) + response = create_or_update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers).value! + response.body unless response.nil? end # - # Gets all scale-out instances of an app. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Gets all scale-out instances of an app. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_instance_identifiers_with_http_info(resource_group_name, name, custom_headers = nil) - list_instance_identifiers_async(resource_group_name, name, custom_headers).value! + def create_or_update_relay_service_connection_with_http_info(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) + create_or_update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers).value! end # - # Gets all scale-out instances of an app. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Gets all scale-out instances of an app. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_instance_identifiers_async(resource_group_name, name, custom_headers = nil) + def create_or_update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'entity_name is nil' if entity_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -6738,18 +6764,27 @@ def list_instance_identifiers_async(resource_group_name, name, custom_headers = # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -6765,7 +6800,7 @@ def list_instance_identifiers_async(resource_group_name, name, custom_headers = if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::WebAppInstanceCollection.mapper() + result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -6779,72 +6814,59 @@ def list_instance_identifiers_async(resource_group_name, name, custom_headers = end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Deletes a relay service connection by its name. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Deletes a relay service connection by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param instance_id [String] The ID of a specific scaled-out instance. This is - # the value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param entity_name [String] Name of the hybrid connection configuration. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. # - def list_instance_deployments(resource_group_name, name, instance_id, custom_headers = nil) - first_page = list_instance_deployments_as_lazy(resource_group_name, name, instance_id, custom_headers) - first_page.get_all_items + def delete_relay_service_connection(resource_group_name, name, entity_name, custom_headers = nil) + response = delete_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers).value! + nil end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Deletes a relay service connection by its name. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Deletes a relay service connection by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param instance_id [String] The ID of a specific scaled-out instance. This is - # the value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param entity_name [String] Name of the hybrid connection configuration. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_instance_deployments_with_http_info(resource_group_name, name, instance_id, custom_headers = nil) - list_instance_deployments_async(resource_group_name, name, instance_id, custom_headers).value! + def delete_relay_service_connection_with_http_info(resource_group_name, name, entity_name, custom_headers = nil) + delete_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers).value! end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Deletes a relay service connection by its name. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Deletes a relay service connection by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param instance_id [String] The ID of a specific scaled-out instance. This is - # the value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param entity_name [String] Name of the hybrid connection configuration. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_instance_deployments_async(resource_group_name, name, instance_id, custom_headers = nil) + def delete_relay_service_connection_async(resource_group_name, name, entity_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'instance_id is nil' if instance_id.nil? + fail ArgumentError, 'entity_name is nil' if entity_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -6854,39 +6876,29 @@ def list_instance_deployments_async(resource_group_name, name, instance_id, cust # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::DeploymentCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -6895,76 +6907,73 @@ def list_instance_deployments_async(resource_group_name, name, instance_id, cust end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Deployment] operation results. + # @return [RelayServiceConnectionEntity] operation results. # - def get_instance_deployment(resource_group_name, name, id, instance_id, custom_headers = nil) - response = get_instance_deployment_async(resource_group_name, name, id, instance_id, custom_headers).value! + def update_relay_service_connection(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) + response = update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers).value! response.body unless response.nil? end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_instance_deployment_with_http_info(resource_group_name, name, id, instance_id, custom_headers = nil) - get_instance_deployment_async(resource_group_name, name, id, instance_id, custom_headers).value! + def update_relay_service_connection_with_http_info(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) + update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers).value! end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_instance_deployment_async(resource_group_name, name, id, instance_id, custom_headers = nil) + def update_relay_service_connection_async(resource_group_name, name, entity_name, connection_envelope, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? - fail ArgumentError, 'instance_id is nil' if instance_id.nil? + fail ArgumentError, 'entity_name is nil' if entity_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -6974,18 +6983,27 @@ def get_instance_deployment_async(resource_group_name, name, id, instance_id, cu # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response @@ -7001,7 +7019,7 @@ def get_instance_deployment_async(resource_group_name, name, id, instance_id, cu if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Deployment.mapper() + result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -7015,80 +7033,56 @@ def get_instance_deployment_async(resource_group_name, name, id, instance_id, cu end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Gets all scale-out instances of an app. # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Gets all scale-out instances of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" - # @param deployment [Deployment] Deployment details. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Deployment] operation results. + # @return [Array] operation results. # - def create_instance_deployment(resource_group_name, name, id, instance_id, deployment, custom_headers = nil) - response = create_instance_deployment_async(resource_group_name, name, id, instance_id, deployment, custom_headers).value! - response.body unless response.nil? + def list_instance_identifiers(resource_group_name, name, custom_headers = nil) + first_page = list_instance_identifiers_as_lazy(resource_group_name, name, custom_headers) + first_page.get_all_items end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Gets all scale-out instances of an app. # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Gets all scale-out instances of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" - # @param deployment [Deployment] Deployment details. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_instance_deployment_with_http_info(resource_group_name, name, id, instance_id, deployment, custom_headers = nil) - create_instance_deployment_async(resource_group_name, name, id, instance_id, deployment, custom_headers).value! + def list_instance_identifiers_with_http_info(resource_group_name, name, custom_headers = nil) + list_instance_identifiers_async(resource_group_name, name, custom_headers).value! end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Gets all scale-out instances of an app. # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Gets all scale-out instances of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" - # @param deployment [Deployment] Deployment details. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_instance_deployment_async(resource_group_name, name, id, instance_id, deployment, custom_headers = nil) + def list_instance_identifiers_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? - fail ArgumentError, 'instance_id is nil' if instance_id.nil? - fail ArgumentError, 'deployment is nil' if deployment.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -7098,27 +7092,18 @@ def create_instance_deployment_async(resource_group_name, name, id, instance_id, # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances' - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::Deployment.mapper() - request_content = @client.serialize(request_mapper, deployment) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}' - - request_url = @base_url || @client.base_url + request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:put, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -7134,7 +7119,7 @@ def create_instance_deployment_async(resource_group_name, name, id, instance_id, if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Deployment.mapper() + result_mapper = Azure::ARM::Web::Models::WebAppInstanceCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -7148,74 +7133,71 @@ def create_instance_deployment_async(resource_group_name, name, id, instance_id, end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # List deployments for an app, or a deployment slot, or for an instance of a + # scaled-out app. # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # List deployments for an app, or a deployment slot, or for an instance of a + # scaled-out app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET + # @param instance_id [String] The ID of a specific scaled-out instance. This is + # the value of the name property in the JSON response from "GET # api/sites/{siteName}/instances" # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [Array] operation results. # - def delete_instance_deployment(resource_group_name, name, id, instance_id, custom_headers = nil) - response = delete_instance_deployment_async(resource_group_name, name, id, instance_id, custom_headers).value! - nil + def list_instance_deployments(resource_group_name, name, instance_id, custom_headers = nil) + first_page = list_instance_deployments_as_lazy(resource_group_name, name, instance_id, custom_headers) + first_page.get_all_items end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # List deployments for an app, or a deployment slot, or for an instance of a + # scaled-out app. # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # List deployments for an app, or a deployment slot, or for an instance of a + # scaled-out app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET + # @param instance_id [String] The ID of a specific scaled-out instance. This is + # the value of the name property in the JSON response from "GET # api/sites/{siteName}/instances" # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_instance_deployment_with_http_info(resource_group_name, name, id, instance_id, custom_headers = nil) - delete_instance_deployment_async(resource_group_name, name, id, instance_id, custom_headers).value! + def list_instance_deployments_with_http_info(resource_group_name, name, instance_id, custom_headers = nil) + list_instance_deployments_async(resource_group_name, name, instance_id, custom_headers).value! end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # List deployments for an app, or a deployment slot, or for an instance of a + # scaled-out app. # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # List deployments for an app, or a deployment slot, or for an instance of a + # scaled-out app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET + # @param instance_id [String] The ID of a specific scaled-out instance. This is + # the value of the name property in the JSON response from "GET # api/sites/{siteName}/instances" # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_instance_deployment_async(resource_group_name, name, id, instance_id, custom_headers = nil) + def list_instance_deployments_async(resource_group_name, name, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -7226,29 +7208,39 @@ def delete_instance_deployment_async(resource_group_name, name, id, instance_id, # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::DeploymentCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -7257,56 +7249,76 @@ def delete_instance_deployment_async(resource_group_name, name, id, instance_id, end # - # Shows whether an app can be cloned to another resource group or subscription. + # Get a deployment by its ID for an app, a specific deployment slot, and/or a + # specific scaled-out instance. # - # Shows whether an app can be cloned to another resource group or subscription. + # Get a deployment by its ID for an app, a specific deployment slot, and/or a + # specific scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param id [String] Deployment ID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteCloneability] operation results. + # @return [Deployment] operation results. # - def is_cloneable(resource_group_name, name, custom_headers = nil) - response = is_cloneable_async(resource_group_name, name, custom_headers).value! + def get_instance_deployment(resource_group_name, name, id, instance_id, custom_headers = nil) + response = get_instance_deployment_async(resource_group_name, name, id, instance_id, custom_headers).value! response.body unless response.nil? end # - # Shows whether an app can be cloned to another resource group or subscription. + # Get a deployment by its ID for an app, a specific deployment slot, and/or a + # specific scaled-out instance. # - # Shows whether an app can be cloned to another resource group or subscription. + # Get a deployment by its ID for an app, a specific deployment slot, and/or a + # specific scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param id [String] Deployment ID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def is_cloneable_with_http_info(resource_group_name, name, custom_headers = nil) - is_cloneable_async(resource_group_name, name, custom_headers).value! + def get_instance_deployment_with_http_info(resource_group_name, name, id, instance_id, custom_headers = nil) + get_instance_deployment_async(resource_group_name, name, id, instance_id, custom_headers).value! end # - # Shows whether an app can be cloned to another resource group or subscription. + # Get a deployment by its ID for an app, a specific deployment slot, and/or a + # specific scaled-out instance. # - # Shows whether an app can be cloned to another resource group or subscription. + # Get a deployment by its ID for an app, a specific deployment slot, and/or a + # specific scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param id [String] Deployment ID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def is_cloneable_async(resource_group_name, name, custom_headers = nil) + def get_instance_deployment_async(resource_group_name, name, id, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'id is nil' if id.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -7316,18 +7328,18 @@ def is_cloneable_async(resource_group_name, name, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -7343,7 +7355,7 @@ def is_cloneable_async(resource_group_name, name, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteCloneability.mapper() + result_mapper = Azure::ARM::Web::Models::Deployment.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -7357,56 +7369,80 @@ def is_cloneable_async(resource_group_name, name, custom_headers = nil) end # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Create a deployment for an app, a specific deployment slot, and/or a specific + # scaled-out instance. # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Create a deployment for an app, a specific deployment slot, and/or a specific + # scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param id [String] ID of an existing deployment. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" + # @param deployment [Deployment] Deployment details. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [Deployment] operation results. # - def list_metric_definitions(resource_group_name, name, custom_headers = nil) - first_page = list_metric_definitions_as_lazy(resource_group_name, name, custom_headers) - first_page.get_all_items + def create_instance_deployment(resource_group_name, name, id, instance_id, deployment, custom_headers = nil) + response = create_instance_deployment_async(resource_group_name, name, id, instance_id, deployment, custom_headers).value! + response.body unless response.nil? end # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Create a deployment for an app, a specific deployment slot, and/or a specific + # scaled-out instance. # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Create a deployment for an app, a specific deployment slot, and/or a specific + # scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param id [String] ID of an existing deployment. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" + # @param deployment [Deployment] Deployment details. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_metric_definitions_with_http_info(resource_group_name, name, custom_headers = nil) - list_metric_definitions_async(resource_group_name, name, custom_headers).value! + def create_instance_deployment_with_http_info(resource_group_name, name, id, instance_id, deployment, custom_headers = nil) + create_instance_deployment_async(resource_group_name, name, id, instance_id, deployment, custom_headers).value! end # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Create a deployment for an app, a specific deployment slot, and/or a specific + # scaled-out instance. # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Create a deployment for an app, a specific deployment slot, and/or a specific + # scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param id [String] ID of an existing deployment. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" + # @param deployment [Deployment] Deployment details. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_metric_definitions_async(resource_group_name, name, custom_headers = nil) + def create_instance_deployment_async(resource_group_name, name, id, instance_id, deployment, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'id is nil' if id.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? + fail ArgumentError, 'deployment is nil' if deployment.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -7416,18 +7452,27 @@ def list_metric_definitions_async(resource_group_name, name, custom_headers = ni # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::Deployment.mapper() + request_content = @client.serialize(request_mapper, deployment) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -7443,7 +7488,7 @@ def list_metric_definitions_async(resource_group_name, name, custom_headers = ni if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ResourceMetricDefinitionCollection.mapper() + result_mapper = Azure::ARM::Web::Models::Deployment.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -7457,74 +7502,75 @@ def list_metric_definitions_async(resource_group_name, name, custom_headers = ni end # - # Gets performance metrics of an app (or deployment slot, if specified). + # Delete a deployment by its ID for an app, a specific deployment slot, and/or + # a specific scaled-out instance. # - # Gets performance metrics of an app (or deployment slot, if specified). + # Delete a deployment by its ID for an app, a specific deployment slot, and/or + # a specific scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param details [Boolean] Specify "true" to include metric details in the - # response. It is "false" by default. - # @param filter [String] Return only metrics specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param id [String] Deployment ID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. # - def list_metrics(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) - first_page = list_metrics_as_lazy(resource_group_name, name, details, filter, custom_headers) - first_page.get_all_items + def delete_instance_deployment(resource_group_name, name, id, instance_id, custom_headers = nil) + response = delete_instance_deployment_async(resource_group_name, name, id, instance_id, custom_headers).value! + nil end # - # Gets performance metrics of an app (or deployment slot, if specified). + # Delete a deployment by its ID for an app, a specific deployment slot, and/or + # a specific scaled-out instance. # - # Gets performance metrics of an app (or deployment slot, if specified). + # Delete a deployment by its ID for an app, a specific deployment slot, and/or + # a specific scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param details [Boolean] Specify "true" to include metric details in the - # response. It is "false" by default. - # @param filter [String] Return only metrics specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param id [String] Deployment ID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_metrics_with_http_info(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) - list_metrics_async(resource_group_name, name, details, filter, custom_headers).value! + def delete_instance_deployment_with_http_info(resource_group_name, name, id, instance_id, custom_headers = nil) + delete_instance_deployment_async(resource_group_name, name, id, instance_id, custom_headers).value! end # - # Gets performance metrics of an app (or deployment slot, if specified). + # Delete a deployment by its ID for an app, a specific deployment slot, and/or + # a specific scaled-out instance. # - # Gets performance metrics of an app (or deployment slot, if specified). + # Delete a deployment by its ID for an app, a specific deployment slot, and/or + # a specific scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param details [Boolean] Specify "true" to include metric details in the - # response. It is "false" by default. - # @param filter [String] Return only metrics specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param id [String] Deployment ID. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_metrics_async(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) + def delete_instance_deployment_async(resource_group_name, name, id, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'id is nil' if id.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -7534,40 +7580,29 @@ def list_metrics_async(resource_group_name, name, details = nil, filter = nil, c # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, - query_params: {'details' => details,'api-version' => api_version}, - skip_encoding_query_params: {'$filter' => filter}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ResourceMetricCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -7576,72 +7611,126 @@ def list_metrics_async(resource_group_name, name, details = nil, filter = nil, c end # - # Restores a web app. + # Invoke the MSDeploy web app extension as pass-through API # - # Restores a web app. + # Invoke the MSDeploy web app extension as pass-through API # - # @param subscription_name [String] Azure subscription # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of web app - # @param migration_options [StorageMigrationOptions] Migration migrationOptions + # @param instance_id [String] Id of web app instance # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [StorageMigrationResponse] operation results. + # @return [MSDeployStatus] operation results. # - def migrate_storage(subscription_name, resource_group_name, name, migration_options, custom_headers = nil) - response = migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers).value! + def get_instance_ms_deploy_status(resource_group_name, name, instance_id, custom_headers = nil) + response = get_instance_ms_deploy_status_async(resource_group_name, name, instance_id, custom_headers).value! response.body unless response.nil? end # - # @param subscription_name [String] Azure subscription + # Invoke the MSDeploy web app extension as pass-through API + # + # Invoke the MSDeploy web app extension as pass-through API + # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of web app - # @param migration_options [StorageMigrationOptions] Migration migrationOptions + # @param instance_id [String] Id of web app instance # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Concurrent::Promise] promise which provides async access to http - # response. + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers = nil) - # Send request - promise = begin_migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers) + def get_instance_ms_deploy_status_with_http_info(resource_group_name, name, instance_id, custom_headers = nil) + get_instance_ms_deploy_status_async(resource_group_name, name, instance_id, custom_headers).value! + end - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::Web::Models::StorageMigrationResponse.mapper() - parsed_response = @client.deserialize(result_mapper, parsed_response) + # + # Invoke the MSDeploy web app extension as pass-through API + # + # Invoke the MSDeploy web app extension as pass-through API + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param instance_id [String] Id of web app instance + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_instance_ms_deploy_status_async(resource_group_name, name, instance_id, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result end - promise + promise.execute end # - # Migrates a local (in-app) MySql database to a remote MySql database. + # Invoke the MSDeploy web app extension as pass-through API # - # Migrates a local (in-app) MySql database to a remote MySql database. + # Invoke the MSDeploy web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of web app - # @param migration_request_envelope [MigrateMySqlRequest] MySql migration - # options + # @param instance_id [String] Id of web app instance + # @param msdeploy [MSDeploy] Details of MSDeploy operation # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Operation] operation results. + # @return [MSDeployStatus] operation results. # - def migrate_my_sql(resource_group_name, name, migration_request_envelope, custom_headers = nil) - response = migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers).value! + def create_instance_msdeploy_operation(resource_group_name, name, instance_id, msdeploy, custom_headers = nil) + response = create_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers).value! response.body unless response.nil? end @@ -7649,22 +7738,22 @@ def migrate_my_sql(resource_group_name, name, migration_request_envelope, custom # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of web app - # @param migration_request_envelope [MigrateMySqlRequest] MySql migration - # options + # @param instance_id [String] Id of web app instance + # @param msdeploy [MSDeploy] Details of MSDeploy operation # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [Concurrent::Promise] promise which provides async access to http # response. # - def migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers = nil) + def create_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers = nil) # Send request - promise = begin_migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers) + promise = begin_create_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::Web::Models::Operation.mapper() + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end @@ -7676,62 +7765,60 @@ def migrate_my_sql_async(resource_group_name, name, migration_request_envelope, end # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Invoke the MSDeploy Log web app extension as pass-through API # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Invoke the MSDeploy Log web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of web app + # @param instance_id [String] Id of web app instance # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MigrateMySqlStatus] operation results. + # @return [MSDeployLog] operation results. # - def get_migrate_my_sql_status(resource_group_name, name, custom_headers = nil) - response = get_migrate_my_sql_status_async(resource_group_name, name, custom_headers).value! + def get_instance_msdeploy_log(resource_group_name, name, instance_id, custom_headers = nil) + response = get_instance_msdeploy_log_async(resource_group_name, name, instance_id, custom_headers).value! response.body unless response.nil? end # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Invoke the MSDeploy Log web app extension as pass-through API # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Invoke the MSDeploy Log web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of web app + # @param instance_id [String] Id of web app instance # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_migrate_my_sql_status_with_http_info(resource_group_name, name, custom_headers = nil) - get_migrate_my_sql_status_async(resource_group_name, name, custom_headers).value! + def get_instance_msdeploy_log_with_http_info(resource_group_name, name, instance_id, custom_headers = nil) + get_instance_msdeploy_log_async(resource_group_name, name, instance_id, custom_headers).value! end # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Invoke the MSDeploy Log web app extension as pass-through API # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Invoke the MSDeploy Log web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of web app + # @param instance_id [String] Id of web app instance # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_migrate_my_sql_status_async(resource_group_name, name, custom_headers = nil) + def get_instance_msdeploy_log_async(resource_group_name, name, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -7741,13 +7828,13 @@ def get_migrate_my_sql_status_async(resource_group_name, name, custom_headers = # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -7768,7 +7855,7 @@ def get_migrate_my_sql_status_async(resource_group_name, name, custom_headers = if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::MigrateMySqlStatus.mapper() + result_mapper = Azure::ARM::Web::Models::MSDeployLog.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -7782,63 +7869,56 @@ def get_migrate_my_sql_status_async(resource_group_name, name, custom_headers = end # - # Gets all network features used by the app (or deployment slot, if specified). + # Shows whether an app can be cloned to another resource group or subscription. # - # Gets all network features used by the app (or deployment slot, if specified). + # Shows whether an app can be cloned to another resource group or subscription. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param view [String] The type of view. This can either be "summary" or - # "detailed". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [NetworkFeatures] operation results. + # @return [SiteCloneability] operation results. # - def list_network_features(resource_group_name, name, view, custom_headers = nil) - response = list_network_features_async(resource_group_name, name, view, custom_headers).value! + def is_cloneable(resource_group_name, name, custom_headers = nil) + response = is_cloneable_async(resource_group_name, name, custom_headers).value! response.body unless response.nil? end # - # Gets all network features used by the app (or deployment slot, if specified). + # Shows whether an app can be cloned to another resource group or subscription. # - # Gets all network features used by the app (or deployment slot, if specified). + # Shows whether an app can be cloned to another resource group or subscription. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param view [String] The type of view. This can either be "summary" or - # "detailed". # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_network_features_with_http_info(resource_group_name, name, view, custom_headers = nil) - list_network_features_async(resource_group_name, name, view, custom_headers).value! + def is_cloneable_with_http_info(resource_group_name, name, custom_headers = nil) + is_cloneable_async(resource_group_name, name, custom_headers).value! end # - # Gets all network features used by the app (or deployment slot, if specified). + # Shows whether an app can be cloned to another resource group or subscription. # - # Gets all network features used by the app (or deployment slot, if specified). + # Shows whether an app can be cloned to another resource group or subscription. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param view [String] The type of view. This can either be "summary" or - # "detailed". # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_network_features_async(resource_group_name, name, view, custom_headers = nil) + def is_cloneable_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'view is nil' if view.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -7848,24 +7928,24 @@ def list_network_features_async(resource_group_name, name, view, custom_headers # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'view' => view,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 404 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -7875,7 +7955,7 @@ def list_network_features_async(resource_group_name, name, view, custom_headers if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::NetworkFeatures.mapper() + result_mapper = Azure::ARM::Web::Models::SiteCloneability.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -7889,69 +7969,54 @@ def list_network_features_async(resource_group_name, name, view, custom_headers end # - # Start capturing network packets for the site. + # Gets all metric definitions of an app (or deployment slot, if specified). # - # Start capturing network packets for the site. + # Gets all metric definitions of an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. - # @param duration_in_seconds [Integer] The duration to keep capturing in - # seconds. - # @param max_frame_length [Integer] The maximum frame length in bytes - # (Optional). - # @param sas_url [String] The Blob URL to store capture file. + # @param name [String] Name of the app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [String] operation results. + # @return [Array] operation results. # - def start_web_site_network_trace(resource_group_name, name, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) - response = start_web_site_network_trace_async(resource_group_name, name, duration_in_seconds, max_frame_length, sas_url, custom_headers).value! - response.body unless response.nil? + def list_metric_definitions(resource_group_name, name, custom_headers = nil) + first_page = list_metric_definitions_as_lazy(resource_group_name, name, custom_headers) + first_page.get_all_items end # - # Start capturing network packets for the site. + # Gets all metric definitions of an app (or deployment slot, if specified). # - # Start capturing network packets for the site. + # Gets all metric definitions of an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. - # @param duration_in_seconds [Integer] The duration to keep capturing in - # seconds. - # @param max_frame_length [Integer] The maximum frame length in bytes - # (Optional). - # @param sas_url [String] The Blob URL to store capture file. + # @param name [String] Name of the app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def start_web_site_network_trace_with_http_info(resource_group_name, name, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) - start_web_site_network_trace_async(resource_group_name, name, duration_in_seconds, max_frame_length, sas_url, custom_headers).value! + def list_metric_definitions_with_http_info(resource_group_name, name, custom_headers = nil) + list_metric_definitions_async(resource_group_name, name, custom_headers).value! end # - # Start capturing network packets for the site. + # Gets all metric definitions of an app (or deployment slot, if specified). # - # Start capturing network packets for the site. + # Gets all metric definitions of an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. - # @param duration_in_seconds [Integer] The duration to keep capturing in - # seconds. - # @param max_frame_length [Integer] The maximum frame length in bytes - # (Optional). - # @param sas_url [String] The Blob URL to store capture file. + # @param name [String] Name of the app. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def start_web_site_network_trace_async(resource_group_name, name, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) + def list_metric_definitions_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -7963,18 +8028,18 @@ def start_web_site_network_trace_async(resource_group_name, name, duration_in_se # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, - query_params: {'durationInSeconds' => duration_in_seconds,'maxFrameLength' => max_frame_length,'sasUrl' => sas_url,'api-version' => api_version}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -7990,13 +8055,7 @@ def start_web_site_network_trace_async(resource_group_name, name, duration_in_se if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = { - required: false, - serialized_name: 'parsed_response', - type: { - name: 'String' - } - } + result_mapper = Azure::ARM::Web::Models::ResourceMetricDefinitionCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -8010,56 +8069,1873 @@ def start_web_site_network_trace_async(resource_group_name, name, duration_in_se end # - # Stop ongoing capturing network packets for the site. + # Gets performance metrics of an app (or deployment slot, if specified). # - # Stop ongoing capturing network packets for the site. + # Gets performance metrics of an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. + # @param name [String] Name of the app. + # @param details [Boolean] Specify "true" to include metric details in the + # response. It is "false" by default. + # @param filter [String] Return only metrics specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_metrics(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) + first_page = list_metrics_as_lazy(resource_group_name, name, details, filter, custom_headers) + first_page.get_all_items + end + + # + # Gets performance metrics of an app (or deployment slot, if specified). + # + # Gets performance metrics of an app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param details [Boolean] Specify "true" to include metric details in the + # response. It is "false" by default. + # @param filter [String] Return only metrics specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_metrics_with_http_info(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) + list_metrics_async(resource_group_name, name, details, filter, custom_headers).value! + end + + # + # Gets performance metrics of an app (or deployment slot, if specified). + # + # Gets performance metrics of an app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param details [Boolean] Specify "true" to include metric details in the + # response. It is "false" by default. + # @param filter [String] Return only metrics specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_metrics_async(resource_group_name, name, details = nil, filter = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'details' => details,'api-version' => api_version}, + skip_encoding_query_params: {'$filter' => filter}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::ResourceMetricCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Restores a web app. + # + # Restores a web app. + # + # @param subscription_name [String] Azure subscription + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param migration_options [StorageMigrationOptions] Migration migrationOptions + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageMigrationResponse] operation results. + # + def migrate_storage(subscription_name, resource_group_name, name, migration_options, custom_headers = nil) + response = migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers).value! + response.body unless response.nil? + end + + # + # @param subscription_name [String] Azure subscription + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param migration_options [StorageMigrationOptions] Migration migrationOptions + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers = nil) + # Send request + promise = begin_migrate_storage_async(subscription_name, resource_group_name, name, migration_options, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::StorageMigrationResponse.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Migrates a local (in-app) MySql database to a remote MySql database. + # + # Migrates a local (in-app) MySql database to a remote MySql database. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param migration_request_envelope [MigrateMySqlRequest] MySql migration + # options + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Operation] operation results. + # + def migrate_my_sql(resource_group_name, name, migration_request_envelope, custom_headers = nil) + response = migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param migration_request_envelope [MigrateMySqlRequest] MySql migration + # options + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers = nil) + # Send request + promise = begin_migrate_my_sql_async(resource_group_name, name, migration_request_envelope, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::Operation.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled + # + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MigrateMySqlStatus] operation results. + # + def get_migrate_my_sql_status(resource_group_name, name, custom_headers = nil) + response = get_migrate_my_sql_status_async(resource_group_name, name, custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled + # + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_migrate_my_sql_status_with_http_info(resource_group_name, name, custom_headers = nil) + get_migrate_my_sql_status_async(resource_group_name, name, custom_headers).value! + end + + # + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled + # + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_migrate_my_sql_status_async(resource_group_name, name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::MigrateMySqlStatus.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all network features used by the app (or deployment slot, if specified). + # + # Gets all network features used by the app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param view [String] The type of view. This can either be "summary" or + # "detailed". + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkFeatures] operation results. + # + def list_network_features(resource_group_name, name, view, custom_headers = nil) + response = list_network_features_async(resource_group_name, name, view, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all network features used by the app (or deployment slot, if specified). + # + # Gets all network features used by the app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param view [String] The type of view. This can either be "summary" or + # "detailed". + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_network_features_with_http_info(resource_group_name, name, view, custom_headers = nil) + list_network_features_async(resource_group_name, name, view, custom_headers).value! + end + + # + # Gets all network features used by the app (or deployment slot, if specified). + # + # Gets all network features used by the app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param view [String] The type of view. This can either be "summary" or + # "detailed". + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_network_features_async(resource_group_name, name, view, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'view is nil' if view.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'view' => view,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 404 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::NetworkFeatures.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Start capturing network packets for the site. + # + # Start capturing network packets for the site. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] The name of the web app. + # @param duration_in_seconds [Integer] The duration to keep capturing in + # seconds. + # @param max_frame_length [Integer] The maximum frame length in bytes + # (Optional). + # @param sas_url [String] The Blob URL to store capture file. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [String] operation results. + # + def start_web_site_network_trace(resource_group_name, name, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) + response = start_web_site_network_trace_async(resource_group_name, name, duration_in_seconds, max_frame_length, sas_url, custom_headers).value! + response.body unless response.nil? + end + + # + # Start capturing network packets for the site. + # + # Start capturing network packets for the site. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] The name of the web app. + # @param duration_in_seconds [Integer] The duration to keep capturing in + # seconds. + # @param max_frame_length [Integer] The maximum frame length in bytes + # (Optional). + # @param sas_url [String] The Blob URL to store capture file. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def start_web_site_network_trace_with_http_info(resource_group_name, name, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) + start_web_site_network_trace_async(resource_group_name, name, duration_in_seconds, max_frame_length, sas_url, custom_headers).value! + end + + # + # Start capturing network packets for the site. + # + # Start capturing network packets for the site. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] The name of the web app. + # @param duration_in_seconds [Integer] The duration to keep capturing in + # seconds. + # @param max_frame_length [Integer] The maximum frame length in bytes + # (Optional). + # @param sas_url [String] The Blob URL to store capture file. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def start_web_site_network_trace_async(resource_group_name, name, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'durationInSeconds' => duration_in_seconds,'maxFrameLength' => max_frame_length,'sasUrl' => sas_url,'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'String' + } + } + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Stop ongoing capturing network packets for the site. + # + # Stop ongoing capturing network packets for the site. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] The name of the web app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [String] operation results. + # + def stop_web_site_network_trace(resource_group_name, name, custom_headers = nil) + response = stop_web_site_network_trace_async(resource_group_name, name, custom_headers).value! + response.body unless response.nil? + end + + # + # Stop ongoing capturing network packets for the site. + # + # Stop ongoing capturing network packets for the site. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] The name of the web app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def stop_web_site_network_trace_with_http_info(resource_group_name, name, custom_headers = nil) + stop_web_site_network_trace_async(resource_group_name, name, custom_headers).value! + end + + # + # Stop ongoing capturing network packets for the site. + # + # Stop ongoing capturing network packets for the site. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] The name of the web app. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def stop_web_site_network_trace_async(resource_group_name, name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'String' + } + } + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Generates a new publishing password for an app (or deployment slot, if + # specified). + # + # Generates a new publishing password for an app (or deployment slot, if + # specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def generate_new_site_publishing_password(resource_group_name, name, custom_headers = nil) + response = generate_new_site_publishing_password_async(resource_group_name, name, custom_headers).value! + nil + end + + # + # Generates a new publishing password for an app (or deployment slot, if + # specified). + # + # Generates a new publishing password for an app (or deployment slot, if + # specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def generate_new_site_publishing_password_with_http_info(resource_group_name, name, custom_headers = nil) + generate_new_site_publishing_password_async(resource_group_name, name, custom_headers).value! + end + + # + # Generates a new publishing password for an app (or deployment slot, if + # specified). + # + # Generates a new publishing password for an app (or deployment slot, if + # specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def generate_new_site_publishing_password_async(resource_group_name, name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets perfmon counters for web app. + # + # Gets perfmon counters for web app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param filter [String] Return only usages/metrics specified in the filter. + # Filter conforms to odata syntax. Example: $filter=(startTime eq + # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + # duration'[Hour|Minute|Day]'. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_perf_mon_counters(resource_group_name, name, filter = nil, custom_headers = nil) + first_page = list_perf_mon_counters_as_lazy(resource_group_name, name, filter, custom_headers) + first_page.get_all_items + end + + # + # Gets perfmon counters for web app. + # + # Gets perfmon counters for web app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param filter [String] Return only usages/metrics specified in the filter. + # Filter conforms to odata syntax. Example: $filter=(startTime eq + # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + # duration'[Hour|Minute|Day]'. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_perf_mon_counters_with_http_info(resource_group_name, name, filter = nil, custom_headers = nil) + list_perf_mon_counters_async(resource_group_name, name, filter, custom_headers).value! + end + + # + # Gets perfmon counters for web app. + # + # Gets perfmon counters for web app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param filter [String] Return only usages/metrics specified in the filter. + # Filter conforms to odata syntax. Example: $filter=(startTime eq + # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + # duration'[Hour|Minute|Day]'. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_perf_mon_counters_async(resource_group_name, name, filter = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + skip_encoding_query_params: {'$filter' => filter}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::PerfMonCounterCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets web app's event logs. + # + # Gets web app's event logs. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SitePhpErrorLogFlag] operation results. + # + def get_site_php_error_log_flag(resource_group_name, name, custom_headers = nil) + response = get_site_php_error_log_flag_async(resource_group_name, name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets web app's event logs. + # + # Gets web app's event logs. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_site_php_error_log_flag_with_http_info(resource_group_name, name, custom_headers = nil) + get_site_php_error_log_flag_async(resource_group_name, name, custom_headers).value! + end + + # + # Gets web app's event logs. + # + # Gets web app's event logs. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_site_php_error_log_flag_async(resource_group_name, name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SitePhpErrorLogFlag.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets the premier add-ons of an app. + # + # Gets the premier add-ons of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PremierAddOn] operation results. + # + def list_premier_add_ons(resource_group_name, name, custom_headers = nil) + response = list_premier_add_ons_async(resource_group_name, name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the premier add-ons of an app. + # + # Gets the premier add-ons of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_premier_add_ons_with_http_info(resource_group_name, name, custom_headers = nil) + list_premier_add_ons_async(resource_group_name, name, custom_headers).value! + end + + # + # Gets the premier add-ons of an app. + # + # Gets the premier add-ons of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_premier_add_ons_async(resource_group_name, name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets a named add-on of an app. + # + # Gets a named add-on of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PremierAddOn] operation results. + # + def get_premier_add_on(resource_group_name, name, premier_add_on_name, custom_headers = nil) + response = get_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets a named add-on of an app. + # + # Gets a named add-on of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, custom_headers = nil) + get_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers).value! + end + + # + # Gets a named add-on of an app. + # + # Gets a named add-on of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates a named add-on of an app. + # + # Updates a named add-on of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. + # @param premier_add_on [PremierAddOn] A JSON representation of the edited + # premier add-on. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PremierAddOn] operation results. + # + def add_premier_add_on(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers = nil) + response = add_premier_add_on_async(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates a named add-on of an app. + # + # Updates a named add-on of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. + # @param premier_add_on [PremierAddOn] A JSON representation of the edited + # premier add-on. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def add_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers = nil) + add_premier_add_on_async(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers).value! + end + + # + # Updates a named add-on of an app. + # + # Updates a named add-on of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. + # @param premier_add_on [PremierAddOn] A JSON representation of the edited + # premier add-on. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def add_premier_add_on_async(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? + fail ArgumentError, 'premier_add_on is nil' if premier_add_on.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() + request_content = @client.serialize(request_mapper, premier_add_on) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Delete a premier add-on from an app. + # + # Delete a premier add-on from an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete_premier_add_on(resource_group_name, name, premier_add_on_name, custom_headers = nil) + response = delete_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers).value! + nil + end + + # + # Delete a premier add-on from an app. + # + # Delete a premier add-on from an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, custom_headers = nil) + delete_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers).value! + end + + # + # Delete a premier add-on from an app. + # + # Delete a premier add-on from an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Get public certificates for an app or a deployment slot. + # + # Get public certificates for an app or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_public_certificates(resource_group_name, name, custom_headers = nil) + first_page = list_public_certificates_as_lazy(resource_group_name, name, custom_headers) + first_page.get_all_items + end + + # + # Get public certificates for an app or a deployment slot. + # + # Get public certificates for an app or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_public_certificates_with_http_info(resource_group_name, name, custom_headers = nil) + list_public_certificates_async(resource_group_name, name, custom_headers).value! + end + + # + # Get public certificates for an app or a deployment slot. + # + # Get public certificates for an app or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_public_certificates_async(resource_group_name, name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::PublicCertificateCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Get the named public certificate for an app (or deployment slot, if + # specified). + # + # Get the named public certificate for an app (or deployment slot, if + # specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param public_certificate_name [String] Public CertificateName + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PublicCertificate] operation results. + # + def get_public_certificate(resource_group_name, name, public_certificate_name, custom_headers = nil) + response = get_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the named public certificate for an app (or deployment slot, if + # specified). + # + # Get the named public certificate for an app (or deployment slot, if + # specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param public_certificate_name [String] Public CertificateName + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_public_certificate_with_http_info(resource_group_name, name, public_certificate_name, custom_headers = nil) + get_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers).value! + end + + # + # Get the named public certificate for an app (or deployment slot, if + # specified). + # + # Get the named public certificate for an app (or deployment slot, if + # specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param public_certificate_name [String] Public CertificateName + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'publicCertificateName' => public_certificate_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::PublicCertificate.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates a hostname binding for an app. + # + # Creates a hostname binding for an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param public_certificate_name [String] Public certificate name. + # @param public_certificate [PublicCertificate] Public certificate details. + # This is the JSON representation of a PublicCertificate object. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PublicCertificate] operation results. + # + def create_or_update_public_certificate(resource_group_name, name, public_certificate_name, public_certificate, custom_headers = nil) + response = create_or_update_public_certificate_async(resource_group_name, name, public_certificate_name, public_certificate, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a hostname binding for an app. + # + # Creates a hostname binding for an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param public_certificate_name [String] Public certificate name. + # @param public_certificate [PublicCertificate] Public certificate details. + # This is the JSON representation of a PublicCertificate object. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_or_update_public_certificate_with_http_info(resource_group_name, name, public_certificate_name, public_certificate, custom_headers = nil) + create_or_update_public_certificate_async(resource_group_name, name, public_certificate_name, public_certificate, custom_headers).value! + end + + # + # Creates a hostname binding for an app. + # + # Creates a hostname binding for an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param public_certificate_name [String] Public certificate name. + # @param public_certificate [PublicCertificate] Public certificate details. + # This is the JSON representation of a PublicCertificate object. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_public_certificate_async(resource_group_name, name, public_certificate_name, public_certificate, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil? + fail ArgumentError, 'public_certificate is nil' if public_certificate.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::PublicCertificate.mapper() + request_content = @client.serialize(request_mapper, public_certificate) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'publicCertificateName' => public_certificate_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::PublicCertificate.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes a hostname binding for an app. + # + # Deletes a hostname binding for an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param public_certificate_name [String] Public Certificate Name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [String] operation results. # - def stop_web_site_network_trace(resource_group_name, name, custom_headers = nil) - response = stop_web_site_network_trace_async(resource_group_name, name, custom_headers).value! + def delete_public_certificate(resource_group_name, name, public_certificate_name, custom_headers = nil) + response = delete_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers).value! + nil + end + + # + # Deletes a hostname binding for an app. + # + # Deletes a hostname binding for an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param public_certificate_name [String] Public Certificate Name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_public_certificate_with_http_info(resource_group_name, name, public_certificate_name, custom_headers = nil) + delete_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers).value! + end + + # + # Deletes a hostname binding for an app. + # + # Deletes a hostname binding for an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param public_certificate_name [String] Public Certificate Name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_public_certificate_async(resource_group_name, name, public_certificate_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'publicCertificateName' => public_certificate_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Gets the publishing profile for an app (or deployment slot, if specified). + # + # Gets the publishing profile for an app (or deployment slot, if specified). + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param publishing_profile_options [CsmPublishingProfileOptions] Specifies + # publishingProfileOptions for publishing profile. For example, use {"format": + # "FileZilla3"} to get a FileZilla publishing profile. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NOT_IMPLEMENTED] operation results. + # + def list_publishing_profile_xml_with_secrets(resource_group_name, name, publishing_profile_options, custom_headers = nil) + response = list_publishing_profile_xml_with_secrets_async(resource_group_name, name, publishing_profile_options, custom_headers).value! response.body unless response.nil? end # - # Stop ongoing capturing network packets for the site. + # Gets the publishing profile for an app (or deployment slot, if specified). # - # Stop ongoing capturing network packets for the site. + # Gets the publishing profile for an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. + # @param name [String] Name of the app. + # @param publishing_profile_options [CsmPublishingProfileOptions] Specifies + # publishingProfileOptions for publishing profile. For example, use {"format": + # "FileZilla3"} to get a FileZilla publishing profile. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def stop_web_site_network_trace_with_http_info(resource_group_name, name, custom_headers = nil) - stop_web_site_network_trace_async(resource_group_name, name, custom_headers).value! + def list_publishing_profile_xml_with_secrets_with_http_info(resource_group_name, name, publishing_profile_options, custom_headers = nil) + list_publishing_profile_xml_with_secrets_async(resource_group_name, name, publishing_profile_options, custom_headers).value! end # - # Stop ongoing capturing network packets for the site. + # Gets the publishing profile for an app (or deployment slot, if specified). # - # Stop ongoing capturing network packets for the site. + # Gets the publishing profile for an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. + # @param name [String] Name of the app. + # @param publishing_profile_options [CsmPublishingProfileOptions] Specifies + # publishingProfileOptions for publishing profile. For example, use {"format": + # "FileZilla3"} to get a FileZilla publishing profile. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def stop_web_site_network_trace_async(resource_group_name, name, custom_headers = nil) + def list_publishing_profile_xml_with_secrets_async(resource_group_name, name, publishing_profile_options, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'publishing_profile_options is nil' if publishing_profile_options.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -8069,7 +9945,15 @@ def stop_web_site_network_trace_async(resource_group_name, name, custom_headers # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::CsmPublishingProfileOptions.mapper() + request_content = @client.serialize(request_mapper, publishing_profile_options) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml' request_url = @base_url || @client.base_url @@ -8077,6 +9961,7 @@ def stop_web_site_network_trace_async(resource_group_name, name, custom_headers middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -8100,7 +9985,7 @@ def stop_web_site_network_trace_async(resource_group_name, name, custom_headers required: false, serialized_name: 'parsed_response', type: { - name: 'String' + name: 'Stream' } } result.body = @client.deserialize(result_mapper, parsed_response) @@ -8116,11 +10001,63 @@ def stop_web_site_network_trace_async(resource_group_name, name, custom_headers end # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Recovers a deleted web app. + # + # Recovers a deleted web app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots API. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [RecoverResponse] operation results. + # + def recover(resource_group_name, name, recovery_entity, custom_headers = nil) + response = recover_async(resource_group_name, name, recovery_entity, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots API. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def recover_async(resource_group_name, name, recovery_entity, custom_headers = nil) + # Send request + promise = begin_recover_async(resource_group_name, name, recovery_entity, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::RecoverResponse.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. @@ -8129,17 +10066,17 @@ def stop_web_site_network_trace_async(resource_group_name, name, custom_headers # will be added to the HTTP request. # # - def generate_new_site_publishing_password(resource_group_name, name, custom_headers = nil) - response = generate_new_site_publishing_password_async(resource_group_name, name, custom_headers).value! + def reset_production_slot_config(resource_group_name, name, custom_headers = nil) + response = reset_production_slot_config_async(resource_group_name, name, custom_headers).value! nil end # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. @@ -8149,16 +10086,16 @@ def generate_new_site_publishing_password(resource_group_name, name, custom_head # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def generate_new_site_publishing_password_with_http_info(resource_group_name, name, custom_headers = nil) - generate_new_site_publishing_password_async(resource_group_name, name, custom_headers).value! + def reset_production_slot_config_with_http_info(resource_group_name, name, custom_headers = nil) + reset_production_slot_config_async(resource_group_name, name, custom_headers).value! end # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. @@ -8168,7 +10105,7 @@ def generate_new_site_publishing_password_with_http_info(resource_group_name, na # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def generate_new_site_publishing_password_async(resource_group_name, name, custom_headers = nil) + def reset_production_slot_config_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -8180,7 +10117,7 @@ def generate_new_site_publishing_password_async(resource_group_name, name, custo # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig' request_url = @base_url || @client.base_url @@ -8197,7 +10134,7 @@ def generate_new_site_publishing_password_async(resource_group_name, name, custo http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -8211,66 +10148,71 @@ def generate_new_site_publishing_password_async(resource_group_name, name, custo end # - # Gets perfmon counters for web app. + # Restarts an app (or deployment slot, if specified). # - # Gets perfmon counters for web app. + # Restarts an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param filter [String] Return only usages/metrics specified in the filter. - # Filter conforms to odata syntax. Example: $filter=(startTime eq - # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq - # duration'[Hour|Minute|Day]'. + # @param name [String] Name of the app. + # @param soft_restart [Boolean] Specify true to apply the configuration + # settings and restarts the app only if necessary. By default, the API always + # restarts and reprovisions the app. + # @param synchronous [Boolean] Specify true to block until the app is + # restarted. By default, it is set to false, and the API responds immediately + # (asynchronous). # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. # - def list_perf_mon_counters(resource_group_name, name, filter = nil, custom_headers = nil) - first_page = list_perf_mon_counters_as_lazy(resource_group_name, name, filter, custom_headers) - first_page.get_all_items + def restart(resource_group_name, name, soft_restart = nil, synchronous = nil, custom_headers = nil) + response = restart_async(resource_group_name, name, soft_restart, synchronous, custom_headers).value! + nil end # - # Gets perfmon counters for web app. + # Restarts an app (or deployment slot, if specified). # - # Gets perfmon counters for web app. + # Restarts an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param filter [String] Return only usages/metrics specified in the filter. - # Filter conforms to odata syntax. Example: $filter=(startTime eq - # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq - # duration'[Hour|Minute|Day]'. + # @param name [String] Name of the app. + # @param soft_restart [Boolean] Specify true to apply the configuration + # settings and restarts the app only if necessary. By default, the API always + # restarts and reprovisions the app. + # @param synchronous [Boolean] Specify true to block until the app is + # restarted. By default, it is set to false, and the API responds immediately + # (asynchronous). # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_perf_mon_counters_with_http_info(resource_group_name, name, filter = nil, custom_headers = nil) - list_perf_mon_counters_async(resource_group_name, name, filter, custom_headers).value! + def restart_with_http_info(resource_group_name, name, soft_restart = nil, synchronous = nil, custom_headers = nil) + restart_async(resource_group_name, name, soft_restart, synchronous, custom_headers).value! end # - # Gets perfmon counters for web app. + # Restarts an app (or deployment slot, if specified). # - # Gets perfmon counters for web app. + # Restarts an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param filter [String] Return only usages/metrics specified in the filter. - # Filter conforms to odata syntax. Example: $filter=(startTime eq - # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq - # duration'[Hour|Minute|Day]'. + # @param name [String] Name of the app. + # @param soft_restart [Boolean] Specify true to apply the configuration + # settings and restarts the app only if necessary. By default, the API always + # restarts and reprovisions the app. + # @param synchronous [Boolean] Specify true to block until the app is + # restarted. By default, it is set to false, and the API responds immediately + # (asynchronous). # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_perf_mon_counters_async(resource_group_name, name, filter = nil, custom_headers = nil) + def restart_async(resource_group_name, name, soft_restart = nil, synchronous = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -8282,19 +10224,18 @@ def list_perf_mon_counters_async(resource_group_name, name, filter = nil, custom # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, - skip_encoding_query_params: {'$filter' => filter}, + query_params: {'softRestart' => soft_restart,'synchronous' => synchronous,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -8306,16 +10247,6 @@ def list_perf_mon_counters_async(resource_group_name, name, filter = nil, custom end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PerfMonCounterCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -8324,54 +10255,54 @@ def list_perf_mon_counters_async(resource_group_name, name, filter = nil, custom end # - # Gets web app's event logs. + # Gets an app's deployment slots. # - # Gets web app's event logs. + # Gets an app's deployment slots. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of the app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SitePhpErrorLogFlag] operation results. + # @return [Array] operation results. # - def get_site_php_error_log_flag(resource_group_name, name, custom_headers = nil) - response = get_site_php_error_log_flag_async(resource_group_name, name, custom_headers).value! - response.body unless response.nil? + def list_slots(resource_group_name, name, custom_headers = nil) + first_page = list_slots_as_lazy(resource_group_name, name, custom_headers) + first_page.get_all_items end # - # Gets web app's event logs. + # Gets an app's deployment slots. # - # Gets web app's event logs. + # Gets an app's deployment slots. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of the app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_site_php_error_log_flag_with_http_info(resource_group_name, name, custom_headers = nil) - get_site_php_error_log_flag_async(resource_group_name, name, custom_headers).value! + def list_slots_with_http_info(resource_group_name, name, custom_headers = nil) + list_slots_async(resource_group_name, name, custom_headers).value! end # - # Gets web app's event logs. + # Gets an app's deployment slots. # - # Gets web app's event logs. + # Gets an app's deployment slots. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of the app. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_site_php_error_log_flag_async(resource_group_name, name, custom_headers = nil) + def list_slots_async(resource_group_name, name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -8383,7 +10314,7 @@ def get_site_php_error_log_flag_async(resource_group_name, name, custom_headers # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots' request_url = @base_url || @client.base_url @@ -8410,7 +10341,7 @@ def get_site_php_error_log_flag_async(resource_group_name, name, custom_headers if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SitePhpErrorLogFlag.mapper() + result_mapper = Azure::ARM::Web::Models::WebAppCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -8424,56 +10355,63 @@ def get_site_php_error_log_flag_async(resource_group_name, name, custom_headers end # - # Gets the premier add-ons of an app. + # Gets the details of a web, mobile, or API app. # - # Gets the premier add-ons of an app. + # Gets the details of a web, mobile, or API app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. By default, this API + # returns the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PremierAddOn] operation results. + # @return [Site] operation results. # - def list_premier_add_ons(resource_group_name, name, custom_headers = nil) - response = list_premier_add_ons_async(resource_group_name, name, custom_headers).value! + def get_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Gets the premier add-ons of an app. + # Gets the details of a web, mobile, or API app. # - # Gets the premier add-ons of an app. + # Gets the details of a web, mobile, or API app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. By default, this API + # returns the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_premier_add_ons_with_http_info(resource_group_name, name, custom_headers = nil) - list_premier_add_ons_async(resource_group_name, name, custom_headers).value! + def get_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets the premier add-ons of an app. + # Gets the details of a web, mobile, or API app. # - # Gets the premier add-ons of an app. + # Gets the details of a web, mobile, or API app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. By default, this API + # returns the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_premier_add_ons_async(resource_group_name, name, custom_headers = nil) + def get_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -8483,13 +10421,13 @@ def list_premier_add_ons_async(resource_group_name, name, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -8510,74 +10448,167 @@ def list_premier_add_ons_async(resource_group_name, name, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() + result_mapper = Azure::ARM::Web::Models::Site.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end - result + result + end + + promise.execute + end + + # + # Creates a new web, mobile, or API app in an existing resource group, or + # updates an existing app. + # + # Creates a new web, mobile, or API app in an existing resource group, or + # updates an existing app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Unique name of the app to create or update. To create or + # update a deployment slot, use the {slot} parameter. + # @param site_envelope [Site] A JSON representation of the app properties. See + # example. + # @param slot [String] Name of the deployment slot to create or update. By + # default, this API attempts to create or modify the production slot. + # @param skip_dns_registration [Boolean] If true web app hostname is not + # registered with DNS on creation. This parameter is + # only used for app creation + # @param skip_custom_domain_verification [Boolean] If true, custom (non + # *.azurewebsites.net) domains associated with web app are not verified. + # @param force_dns_registration [Boolean] If true, web app hostname is force + # registered with DNS + # @param ttl_in_seconds [String] Time to live in seconds for web app's default + # domain name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Site] operation results. + # + def create_or_update_slot(resource_group_name, name, site_envelope, slot, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) + response = create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration, skip_custom_domain_verification, force_dns_registration, ttl_in_seconds, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Unique name of the app to create or update. To create or + # update a deployment slot, use the {slot} parameter. + # @param site_envelope [Site] A JSON representation of the app properties. See + # example. + # @param slot [String] Name of the deployment slot to create or update. By + # default, this API attempts to create or modify the production slot. + # @param skip_dns_registration [Boolean] If true web app hostname is not + # registered with DNS on creation. This parameter is + # only used for app creation + # @param skip_custom_domain_verification [Boolean] If true, custom (non + # *.azurewebsites.net) domains associated with web app are not verified. + # @param force_dns_registration [Boolean] If true, web app hostname is force + # registered with DNS + # @param ttl_in_seconds [String] Time to live in seconds for web app's default + # domain name + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) + # Send request + promise = begin_create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration, skip_custom_domain_verification, force_dns_registration, ttl_in_seconds, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::Site.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) end - promise.execute + promise end # - # Gets a named add-on of an app. + # Deletes a web, mobile, or API app, or one of the deployment slots. # - # Gets a named add-on of an app. + # Deletes a web, mobile, or API app, or one of the deployment slots. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. + # @param name [String] Name of the app to delete. + # @param slot [String] Name of the deployment slot to delete. By default, the + # API deletes the production slot. + # @param delete_metrics [Boolean] If true, web app metrics are also deleted + # @param delete_empty_server_farm [Boolean] Specify true if the App Service + # plan will be empty after app deletion and you want to delete the empty App + # Service plan. By default, the empty App Service plan is not deleted. + # @param skip_dns_registration [Boolean] If true, DNS registration is skipped # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PremierAddOn] operation results. # - def get_premier_add_on(resource_group_name, name, premier_add_on_name, custom_headers = nil) - response = get_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers).value! - response.body unless response.nil? + def delete_slot(resource_group_name, name, slot, delete_metrics = nil, delete_empty_server_farm = nil, skip_dns_registration = nil, custom_headers = nil) + response = delete_slot_async(resource_group_name, name, slot, delete_metrics, delete_empty_server_farm, skip_dns_registration, custom_headers).value! + nil end # - # Gets a named add-on of an app. + # Deletes a web, mobile, or API app, or one of the deployment slots. # - # Gets a named add-on of an app. + # Deletes a web, mobile, or API app, or one of the deployment slots. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. + # @param name [String] Name of the app to delete. + # @param slot [String] Name of the deployment slot to delete. By default, the + # API deletes the production slot. + # @param delete_metrics [Boolean] If true, web app metrics are also deleted + # @param delete_empty_server_farm [Boolean] Specify true if the App Service + # plan will be empty after app deletion and you want to delete the empty App + # Service plan. By default, the empty App Service plan is not deleted. + # @param skip_dns_registration [Boolean] If true, DNS registration is skipped # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, custom_headers = nil) - get_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers).value! + def delete_slot_with_http_info(resource_group_name, name, slot, delete_metrics = nil, delete_empty_server_farm = nil, skip_dns_registration = nil, custom_headers = nil) + delete_slot_async(resource_group_name, name, slot, delete_metrics, delete_empty_server_farm, skip_dns_registration, custom_headers).value! end # - # Gets a named add-on of an app. + # Deletes a web, mobile, or API app, or one of the deployment slots. # - # Gets a named add-on of an app. + # Deletes a web, mobile, or API app, or one of the deployment slots. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. + # @param name [String] Name of the app to delete. + # @param slot [String] Name of the deployment slot to delete. By default, the + # API deletes the production slot. + # @param delete_metrics [Boolean] If true, web app metrics are also deleted + # @param delete_empty_server_farm [Boolean] Specify true if the App Service + # plan will be empty after app deletion and you want to delete the empty App + # Service plan. By default, the empty App Service plan is not deleted. + # @param skip_dns_registration [Boolean] If true, DNS registration is skipped # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers = nil) + def delete_slot_async(resource_group_name, name, slot, delete_metrics = nil, delete_empty_server_farm = nil, skip_dns_registration = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -8587,39 +10618,29 @@ def get_premier_add_on_async(resource_group_name, name, premier_add_on_name, cus # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'deleteMetrics' => delete_metrics,'deleteEmptyServerFarm' => delete_empty_server_farm,'skipDnsRegistration' => skip_dns_registration,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -8628,67 +10649,66 @@ def get_premier_add_on_async(resource_group_name, name, premier_add_on_name, cus end # - # Updates a named add-on of an app. + # Analyze a custom hostname. # - # Updates a named add-on of an app. + # Analyze a custom hostname. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. - # @param premier_add_on [PremierAddOn] A JSON representation of the edited - # premier add-on. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param host_name [String] Custom hostname # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PremierAddOn] operation results. + # @return [CustomHostnameAnalysisResult] operation results. # - def add_premier_add_on(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers = nil) - response = add_premier_add_on_async(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers).value! + def analyze_custom_hostname_slot(resource_group_name, name, slot, host_name = nil, custom_headers = nil) + response = analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! response.body unless response.nil? end # - # Updates a named add-on of an app. + # Analyze a custom hostname. # - # Updates a named add-on of an app. + # Analyze a custom hostname. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. - # @param premier_add_on [PremierAddOn] A JSON representation of the edited - # premier add-on. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param host_name [String] Custom hostname # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def add_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers = nil) - add_premier_add_on_async(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers).value! + def analyze_custom_hostname_slot_with_http_info(resource_group_name, name, slot, host_name = nil, custom_headers = nil) + analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! end # - # Updates a named add-on of an app. + # Analyze a custom hostname. # - # Updates a named add-on of an app. + # Analyze a custom hostname. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. - # @param premier_add_on [PremierAddOn] A JSON representation of the edited - # premier add-on. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param host_name [String] Custom hostname # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def add_premier_add_on_async(resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers = nil) + def analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_name = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? - fail ArgumentError, 'premier_add_on is nil' if premier_add_on.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -8698,27 +10718,18 @@ def add_premier_add_on_async(resource_group_name, name, premier_add_on_name, pre # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() - request_content = @client.serialize(request_mapper, premier_add_on) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, - body: request_content, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'hostName' => host_name,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:put, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -8734,7 +10745,7 @@ def add_premier_add_on_async(resource_group_name, name, premier_add_on_name, pre if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() + result_mapper = Azure::ARM::Web::Models::CustomHostnameAnalysisResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -8748,59 +10759,75 @@ def add_premier_add_on_async(resource_group_name, name, premier_add_on_name, pre end # - # Delete a premier add-on from an app. + # Applies the configuration settings from the target slot onto the current + # slot. # - # Delete a premier add-on from an app. + # Applies the configuration settings from the target slot onto the current + # slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param slot [String] Name of the source slot. If a slot is not specified, the + # production slot is used as the source slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # - def delete_premier_add_on(resource_group_name, name, premier_add_on_name, custom_headers = nil) - response = delete_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers).value! + def apply_slot_configuration_slot(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) + response = apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers).value! nil end # - # Delete a premier add-on from an app. + # Applies the configuration settings from the target slot onto the current + # slot. # - # Delete a premier add-on from an app. + # Applies the configuration settings from the target slot onto the current + # slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param slot [String] Name of the source slot. If a slot is not specified, the + # production slot is used as the source slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_premier_add_on_with_http_info(resource_group_name, name, premier_add_on_name, custom_headers = nil) - delete_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers).value! + def apply_slot_configuration_slot_with_http_info(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) + apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers).value! end # - # Delete a premier add-on from an app. + # Applies the configuration settings from the target slot onto the current + # slot. # - # Delete a premier add-on from an app. + # Applies the configuration settings from the target slot onto the current + # slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. + # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target + # slot name. See example. + # @param slot [String] Name of the source slot. If a slot is not specified, the + # production slot is used as the source slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_premier_add_on_async(resource_group_name, name, premier_add_on_name, custom_headers = nil) + def apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? + fail ArgumentError, 'slot_swap_entity is nil' if slot_swap_entity.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -8810,18 +10837,27 @@ def delete_premier_add_on_async(resource_group_name, name, premier_add_on_name, # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::CsmSlotEntity.mapper() + request_content = @client.serialize(request_mapper, slot_swap_entity) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -8841,66 +10877,70 @@ def delete_premier_add_on_async(resource_group_name, name, premier_add_on_name, end # - # Gets the publishing profile for an app (or deployment slot, if specified). + # Creates a backup of an app. # - # Gets the publishing profile for an app (or deployment slot, if specified). + # Creates a backup of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param publishing_profile_options [CsmPublishingProfileOptions] Specifies - # publishingProfileOptions for publishing profile. For example, use {"format": - # "FileZilla3"} to get a FileZilla publishing profile. + # @param request [BackupRequest] Backup configuration. You can use the JSON + # response from the POST action as input here. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will create a backup for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [NOT_IMPLEMENTED] operation results. + # @return [BackupItem] operation results. # - def list_publishing_profile_xml_with_secrets(resource_group_name, name, publishing_profile_options, custom_headers = nil) - response = list_publishing_profile_xml_with_secrets_async(resource_group_name, name, publishing_profile_options, custom_headers).value! + def backup_slot(resource_group_name, name, request, slot, custom_headers = nil) + response = backup_slot_async(resource_group_name, name, request, slot, custom_headers).value! response.body unless response.nil? end # - # Gets the publishing profile for an app (or deployment slot, if specified). + # Creates a backup of an app. # - # Gets the publishing profile for an app (or deployment slot, if specified). + # Creates a backup of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param publishing_profile_options [CsmPublishingProfileOptions] Specifies - # publishingProfileOptions for publishing profile. For example, use {"format": - # "FileZilla3"} to get a FileZilla publishing profile. + # @param request [BackupRequest] Backup configuration. You can use the JSON + # response from the POST action as input here. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will create a backup for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_publishing_profile_xml_with_secrets_with_http_info(resource_group_name, name, publishing_profile_options, custom_headers = nil) - list_publishing_profile_xml_with_secrets_async(resource_group_name, name, publishing_profile_options, custom_headers).value! + def backup_slot_with_http_info(resource_group_name, name, request, slot, custom_headers = nil) + backup_slot_async(resource_group_name, name, request, slot, custom_headers).value! end # - # Gets the publishing profile for an app (or deployment slot, if specified). + # Creates a backup of an app. # - # Gets the publishing profile for an app (or deployment slot, if specified). + # Creates a backup of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param publishing_profile_options [CsmPublishingProfileOptions] Specifies - # publishingProfileOptions for publishing profile. For example, use {"format": - # "FileZilla3"} to get a FileZilla publishing profile. + # @param request [BackupRequest] Backup configuration. You can use the JSON + # response from the POST action as input here. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will create a backup for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_publishing_profile_xml_with_secrets_async(resource_group_name, name, publishing_profile_options, custom_headers = nil) + def backup_slot_async(resource_group_name, name, request, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'publishing_profile_options is nil' if publishing_profile_options.nil? + fail ArgumentError, 'request is nil' if request.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -8914,17 +10954,17 @@ def list_publishing_profile_xml_with_secrets_async(resource_group_name, name, pu request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::CsmPublishingProfileOptions.mapper() - request_content = @client.serialize(request_mapper, publishing_profile_options) + request_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() + request_content = @client.serialize(request_mapper, request) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), @@ -8946,13 +10986,7 @@ def list_publishing_profile_xml_with_secrets_async(resource_group_name, name, pu if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = { - required: false, - serialized_name: 'parsed_response', - type: { - name: 'Stream' - } - } + result_mapper = Azure::ARM::Web::Models::BackupItem.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -8966,113 +11000,63 @@ def list_publishing_profile_xml_with_secrets_async(resource_group_name, name, pu end # - # Recovers a deleted web app. - # - # Recovers a deleted web app. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [RecoverResponse] operation results. - # - def recover(resource_group_name, name, recovery_entity, custom_headers = nil) - response = recover_async(resource_group_name, name, recovery_entity, custom_headers).value! - response.body unless response.nil? - end - - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Concurrent::Promise] promise which provides async access to http - # response. - # - def recover_async(resource_group_name, name, recovery_entity, custom_headers = nil) - # Send request - promise = begin_recover_async(resource_group_name, name, recovery_entity, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::Web::Models::RecoverResponse.mapper() - parsed_response = @client.deserialize(result_mapper, parsed_response) - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. + # Gets existing backups of an app. # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. + # Gets existing backups of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get backups of the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [Array] operation results. # - def reset_production_slot_config(resource_group_name, name, custom_headers = nil) - response = reset_production_slot_config_async(resource_group_name, name, custom_headers).value! - nil + def list_backups_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_backups_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items end # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. + # Gets existing backups of an app. # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. + # Gets existing backups of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get backups of the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def reset_production_slot_config_with_http_info(resource_group_name, name, custom_headers = nil) - reset_production_slot_config_async(resource_group_name, name, custom_headers).value! + def list_backups_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_backups_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. + # Gets existing backups of an app. # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. + # Gets existing backups of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get backups of the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def reset_production_slot_config_async(resource_group_name, name, custom_headers = nil) + def list_backups_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -9082,18 +11066,18 @@ def reset_production_slot_config_async(resource_group_name, name, custom_headers # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -9105,6 +11089,16 @@ def reset_production_slot_config_async(resource_group_name, name, custom_headers end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::BackupItemCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -9113,56 +11107,76 @@ def reset_production_slot_config_async(resource_group_name, name, custom_headers end # - # Gets the category of ResourceHealthMetadata to use for the given site + # Discovers an existing app backup that can be restored from a blob in Azure + # storage. # - # Gets the category of ResourceHealthMetadata to use for the given site + # Discovers an existing app backup that can be restored from a blob in Azure + # storage. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of the app. + # @param request [RestoreRequest] A RestoreRequest object that includes Azure + # storage URL and blog name for discovery of backup. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will perform discovery for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ResourceHealthMetadata] operation results. + # @return [RestoreRequest] operation results. # - def get_resource_health_metadata(resource_group_name, name, custom_headers = nil) - response = get_resource_health_metadata_async(resource_group_name, name, custom_headers).value! + def discover_restore_slot(resource_group_name, name, request, slot, custom_headers = nil) + response = discover_restore_slot_async(resource_group_name, name, request, slot, custom_headers).value! response.body unless response.nil? end # - # Gets the category of ResourceHealthMetadata to use for the given site + # Discovers an existing app backup that can be restored from a blob in Azure + # storage. # - # Gets the category of ResourceHealthMetadata to use for the given site + # Discovers an existing app backup that can be restored from a blob in Azure + # storage. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of the app. + # @param request [RestoreRequest] A RestoreRequest object that includes Azure + # storage URL and blog name for discovery of backup. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will perform discovery for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_resource_health_metadata_with_http_info(resource_group_name, name, custom_headers = nil) - get_resource_health_metadata_async(resource_group_name, name, custom_headers).value! + def discover_restore_slot_with_http_info(resource_group_name, name, request, slot, custom_headers = nil) + discover_restore_slot_async(resource_group_name, name, request, slot, custom_headers).value! end # - # Gets the category of ResourceHealthMetadata to use for the given site + # Discovers an existing app backup that can be restored from a blob in Azure + # storage. # - # Gets the category of ResourceHealthMetadata to use for the given site + # Discovers an existing app backup that can be restored from a blob in Azure + # storage. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app + # @param name [String] Name of the app. + # @param request [RestoreRequest] A RestoreRequest object that includes Azure + # storage URL and blog name for discovery of backup. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will perform discovery for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_resource_health_metadata_async(resource_group_name, name, custom_headers = nil) + def discover_restore_slot_async(resource_group_name, name, request, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'request is nil' if request.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -9172,18 +11186,27 @@ def get_resource_health_metadata_async(resource_group_name, name, custom_headers # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::RestoreRequest.mapper() + request_content = @client.serialize(request_mapper, request) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/discover' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -9199,7 +11222,7 @@ def get_resource_health_metadata_async(resource_group_name, name, custom_headers if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ResourceHealthMetadata.mapper() + result_mapper = Azure::ARM::Web::Models::RestoreRequest.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -9213,73 +11236,67 @@ def get_resource_health_metadata_async(resource_group_name, name, custom_headers end # - # Restarts an app (or deployment slot, if specified). + # Gets a backup of an app by its ID. # - # Restarts an app (or deployment slot, if specified). + # Gets a backup of an app by its ID. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param soft_restart [Boolean] Specify true to apply the configuration - # settings and restarts the app only if necessary. By default, the API always - # restarts and reprovisions the app. - # @param synchronous [Boolean] Specify true to block until the app is - # restarted. By default, it is set to false, and the API responds immediately - # (asynchronous). + # @param backup_id [String] ID of the backup. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get a backup of the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [BackupItem] operation results. # - def restart(resource_group_name, name, soft_restart = nil, synchronous = nil, custom_headers = nil) - response = restart_async(resource_group_name, name, soft_restart, synchronous, custom_headers).value! - nil + def get_backup_status_slot(resource_group_name, name, backup_id, slot, custom_headers = nil) + response = get_backup_status_slot_async(resource_group_name, name, backup_id, slot, custom_headers).value! + response.body unless response.nil? end # - # Restarts an app (or deployment slot, if specified). + # Gets a backup of an app by its ID. # - # Restarts an app (or deployment slot, if specified). + # Gets a backup of an app by its ID. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param soft_restart [Boolean] Specify true to apply the configuration - # settings and restarts the app only if necessary. By default, the API always - # restarts and reprovisions the app. - # @param synchronous [Boolean] Specify true to block until the app is - # restarted. By default, it is set to false, and the API responds immediately - # (asynchronous). + # @param backup_id [String] ID of the backup. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get a backup of the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def restart_with_http_info(resource_group_name, name, soft_restart = nil, synchronous = nil, custom_headers = nil) - restart_async(resource_group_name, name, soft_restart, synchronous, custom_headers).value! + def get_backup_status_slot_with_http_info(resource_group_name, name, backup_id, slot, custom_headers = nil) + get_backup_status_slot_async(resource_group_name, name, backup_id, slot, custom_headers).value! end # - # Restarts an app (or deployment slot, if specified). + # Gets a backup of an app by its ID. # - # Restarts an app (or deployment slot, if specified). + # Gets a backup of an app by its ID. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param soft_restart [Boolean] Specify true to apply the configuration - # settings and restarts the app only if necessary. By default, the API always - # restarts and reprovisions the app. - # @param synchronous [Boolean] Specify true to block until the app is - # restarted. By default, it is set to false, and the API responds immediately - # (asynchronous). + # @param backup_id [String] ID of the backup. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get a backup of the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def restart_async(resource_group_name, name, soft_restart = nil, synchronous = nil, custom_headers = nil) + def get_backup_status_slot_async(resource_group_name, name, backup_id, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'backup_id is nil' if backup_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -9289,18 +11306,18 @@ def restart_async(resource_group_name, name, soft_restart = nil, synchronous = n # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, - query_params: {'softRestart' => soft_restart,'synchronous' => synchronous,'api-version' => api_version}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -9311,8 +11328,18 @@ def restart_async(resource_group_name, name, soft_restart = nil, synchronous = n fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::BackupItem.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + result end @@ -9320,56 +11347,66 @@ def restart_async(resource_group_name, name, soft_restart = nil, synchronous = n end # - # Gets an app's deployment slots. + # Deletes a backup of an app by its ID. # - # Gets an app's deployment slots. + # Deletes a backup of an app by its ID. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param backup_id [String] ID of the backup. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete a backup of the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. # - def list_slots(resource_group_name, name, custom_headers = nil) - first_page = list_slots_as_lazy(resource_group_name, name, custom_headers) - first_page.get_all_items + def delete_backup_slot(resource_group_name, name, backup_id, slot, custom_headers = nil) + response = delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_headers).value! + nil end # - # Gets an app's deployment slots. + # Deletes a backup of an app by its ID. # - # Gets an app's deployment slots. + # Deletes a backup of an app by its ID. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param backup_id [String] ID of the backup. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete a backup of the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_slots_with_http_info(resource_group_name, name, custom_headers = nil) - list_slots_async(resource_group_name, name, custom_headers).value! + def delete_backup_slot_with_http_info(resource_group_name, name, backup_id, slot, custom_headers = nil) + delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_headers).value! end # - # Gets an app's deployment slots. + # Deletes a backup of an app by its ID. # - # Gets an app's deployment slots. + # Deletes a backup of an app by its ID. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param backup_id [String] ID of the backup. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete a backup of the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_slots_async(resource_group_name, name, custom_headers = nil) + def delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'backup_id is nil' if backup_id.nil? + fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -9379,39 +11416,29 @@ def list_slots_async(resource_group_name, name, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::WebAppCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -9420,62 +11447,88 @@ def list_slots_async(resource_group_name, name, custom_headers = nil) end # - # Gets the details of a web, mobile, or API app. + # Gets status of a web app backup that may be in progress, including secrets + # associated with the backup, such as the Azure Storage SAS URL. Also can be + # used to update the SAS URL for the backup if a new URL is passed in the + # request body. # - # Gets the details of a web, mobile, or API app. + # Gets status of a web app backup that may be in progress, including secrets + # associated with the backup, such as the Azure Storage SAS URL. Also can be + # used to update the SAS URL for the backup if a new URL is passed in the + # request body. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. By default, this API - # returns the production slot. + # @param name [String] Name of web app + # @param backup_id [String] Id of backup + # @param request [BackupRequest] Information on backup request + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Site] operation results. + # @return [BackupItem] operation results. # - def get_slot(resource_group_name, name, slot, custom_headers = nil) - response = get_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_backup_status_secrets_slot(resource_group_name, name, backup_id, request, slot, custom_headers = nil) + response = list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers).value! response.body unless response.nil? end # - # Gets the details of a web, mobile, or API app. + # Gets status of a web app backup that may be in progress, including secrets + # associated with the backup, such as the Azure Storage SAS URL. Also can be + # used to update the SAS URL for the backup if a new URL is passed in the + # request body. # - # Gets the details of a web, mobile, or API app. + # Gets status of a web app backup that may be in progress, including secrets + # associated with the backup, such as the Azure Storage SAS URL. Also can be + # used to update the SAS URL for the backup if a new URL is passed in the + # request body. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. By default, this API - # returns the production slot. + # @param name [String] Name of web app + # @param backup_id [String] Id of backup + # @param request [BackupRequest] Information on backup request + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - get_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_backup_status_secrets_slot_with_http_info(resource_group_name, name, backup_id, request, slot, custom_headers = nil) + list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers).value! end # - # Gets the details of a web, mobile, or API app. + # Gets status of a web app backup that may be in progress, including secrets + # associated with the backup, such as the Azure Storage SAS URL. Also can be + # used to update the SAS URL for the backup if a new URL is passed in the + # request body. # - # Gets the details of a web, mobile, or API app. + # Gets status of a web app backup that may be in progress, including secrets + # associated with the backup, such as the Azure Storage SAS URL. Also can be + # used to update the SAS URL for the backup if a new URL is passed in the + # request body. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. By default, this API - # returns the production slot. + # @param name [String] Name of web app + # @param backup_id [String] Id of backup + # @param request [BackupRequest] Information on backup request + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'backup_id is nil' if backup_id.nil? + fail ArgumentError, 'request is nil' if request.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -9486,18 +11539,27 @@ def get_slot_async(resource_group_name, name, slot, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() + request_content = @client.serialize(request_mapper, request) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -9513,7 +11575,7 @@ def get_slot_async(resource_group_name, name, slot, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Site.mapper() + result_mapper = Azure::ARM::Web::Models::BackupItem.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -9527,71 +11589,49 @@ def get_slot_async(resource_group_name, name, slot, custom_headers = nil) end # - # Creates a new web, mobile, or API app in an existing resource group, or - # updates an existing app. + # Restores a specific backup to another app (or deployment slot, if specified). # - # Creates a new web, mobile, or API app in an existing resource group, or - # updates an existing app. + # Restores a specific backup to another app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Unique name of the app to create or update. To create or - # update a deployment slot, use the {slot} parameter. - # @param site_envelope [Site] A JSON representation of the app properties. See - # example. - # @param slot [String] Name of the deployment slot to create or update. By - # default, this API attempts to create or modify the production slot. - # @param skip_dns_registration [Boolean] If true web app hostname is not - # registered with DNS on creation. This parameter is - # only used for app creation - # @param skip_custom_domain_verification [Boolean] If true, custom (non - # *.azurewebsites.net) domains associated with web app are not verified. - # @param force_dns_registration [Boolean] If true, web app hostname is force - # registered with DNS - # @param ttl_in_seconds [String] Time to live in seconds for web app's default - # domain name + # @param name [String] Name of the app. + # @param backup_id [String] ID of the backup. + # @param request [RestoreRequest] Information on restore request + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will restore a backup of the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Site] operation results. + # @return [RestoreResponse] operation results. # - def create_or_update_slot(resource_group_name, name, site_envelope, slot, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) - response = create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration, skip_custom_domain_verification, force_dns_registration, ttl_in_seconds, custom_headers).value! + def restore_slot(resource_group_name, name, backup_id, request, slot, custom_headers = nil) + response = restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers).value! response.body unless response.nil? end # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Unique name of the app to create or update. To create or - # update a deployment slot, use the {slot} parameter. - # @param site_envelope [Site] A JSON representation of the app properties. See - # example. - # @param slot [String] Name of the deployment slot to create or update. By - # default, this API attempts to create or modify the production slot. - # @param skip_dns_registration [Boolean] If true web app hostname is not - # registered with DNS on creation. This parameter is - # only used for app creation - # @param skip_custom_domain_verification [Boolean] If true, custom (non - # *.azurewebsites.net) domains associated with web app are not verified. - # @param force_dns_registration [Boolean] If true, web app hostname is force - # registered with DNS - # @param ttl_in_seconds [String] Time to live in seconds for web app's default - # domain name + # @param name [String] Name of the app. + # @param backup_id [String] ID of the backup. + # @param request [RestoreRequest] Information on restore request + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will restore a backup of the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [Concurrent::Promise] promise which provides async access to http # response. # - def create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration = nil, skip_custom_domain_verification = nil, force_dns_registration = nil, ttl_in_seconds = nil, custom_headers = nil) + def restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers = nil) # Send request - promise = begin_create_or_update_slot_async(resource_group_name, name, site_envelope, slot, skip_dns_registration, skip_custom_domain_verification, force_dns_registration, ttl_in_seconds, custom_headers) + promise = begin_restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::Web::Models::Site.mapper() + result_mapper = Azure::ARM::Web::Models::RestoreResponse.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end @@ -9603,74 +11643,60 @@ def create_or_update_slot_async(resource_group_name, name, site_envelope, slot, end # - # Deletes a web, mobile, or API app, or one of the deployment slots. + # List the configurations of an app # - # Deletes a web, mobile, or API app, or one of the deployment slots. + # List the configurations of an app # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app to delete. - # @param slot [String] Name of the deployment slot to delete. By default, the - # API deletes the production slot. - # @param delete_metrics [Boolean] If true, web app metrics are also deleted - # @param delete_empty_server_farm [Boolean] Specify true if the App Service - # plan will be empty after app deletion and you want to delete the empty App - # Service plan. By default, the empty App Service plan is not deleted. - # @param skip_dns_registration [Boolean] If true, DNS registration is skipped + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will return configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [Array] operation results. # - def delete_slot(resource_group_name, name, slot, delete_metrics = nil, delete_empty_server_farm = nil, skip_dns_registration = nil, custom_headers = nil) - response = delete_slot_async(resource_group_name, name, slot, delete_metrics, delete_empty_server_farm, skip_dns_registration, custom_headers).value! - nil + def list_configurations_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_configurations_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items end # - # Deletes a web, mobile, or API app, or one of the deployment slots. + # List the configurations of an app # - # Deletes a web, mobile, or API app, or one of the deployment slots. + # List the configurations of an app # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app to delete. - # @param slot [String] Name of the deployment slot to delete. By default, the - # API deletes the production slot. - # @param delete_metrics [Boolean] If true, web app metrics are also deleted - # @param delete_empty_server_farm [Boolean] Specify true if the App Service - # plan will be empty after app deletion and you want to delete the empty App - # Service plan. By default, the empty App Service plan is not deleted. - # @param skip_dns_registration [Boolean] If true, DNS registration is skipped + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will return configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_slot_with_http_info(resource_group_name, name, slot, delete_metrics = nil, delete_empty_server_farm = nil, skip_dns_registration = nil, custom_headers = nil) - delete_slot_async(resource_group_name, name, slot, delete_metrics, delete_empty_server_farm, skip_dns_registration, custom_headers).value! + def list_configurations_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_configurations_slot_async(resource_group_name, name, slot, custom_headers).value! end - # - # Deletes a web, mobile, or API app, or one of the deployment slots. - # - # Deletes a web, mobile, or API app, or one of the deployment slots. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of the app to delete. - # @param slot [String] Name of the deployment slot to delete. By default, the - # API deletes the production slot. - # @param delete_metrics [Boolean] If true, web app metrics are also deleted - # @param delete_empty_server_farm [Boolean] Specify true if the App Service - # plan will be empty after app deletion and you want to delete the empty App - # Service plan. By default, the empty App Service plan is not deleted. - # @param skip_dns_registration [Boolean] If true, DNS registration is skipped + # + # List the configurations of an app + # + # List the configurations of an app + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will return configuration for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_slot_async(resource_group_name, name, slot, delete_metrics = nil, delete_empty_server_farm = nil, skip_dns_registration = nil, custom_headers = nil) + def list_configurations_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -9683,29 +11709,39 @@ def delete_slot_async(resource_group_name, name, slot, delete_metrics = nil, del # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'deleteMetrics' => delete_metrics,'deleteEmptyServerFarm' => delete_empty_server_farm,'skipDnsRegistration' => skip_dns_registration,'api-version' => api_version}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 404 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::SiteConfigResourceCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -9714,65 +11750,66 @@ def delete_slot_async(resource_group_name, name, slot, delete_metrics = nil, del end # - # Analyze a custom hostname. + # Replaces the application settings of an app. # - # Analyze a custom hostname. + # Replaces the application settings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. - # @param host_name [String] Custom hostname + # @param name [String] Name of the app. + # @param app_settings [StringDictionary] Application settings of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the application settings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [CustomHostnameAnalysisResult] operation results. + # @return [StringDictionary] operation results. # - def analyze_custom_hostname_slot(resource_group_name, name, slot, host_name = nil, custom_headers = nil) - response = analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! + def update_application_settings_slot(resource_group_name, name, app_settings, slot, custom_headers = nil) + response = update_application_settings_slot_async(resource_group_name, name, app_settings, slot, custom_headers).value! response.body unless response.nil? end # - # Analyze a custom hostname. + # Replaces the application settings of an app. # - # Analyze a custom hostname. + # Replaces the application settings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. - # @param host_name [String] Custom hostname + # @param name [String] Name of the app. + # @param app_settings [StringDictionary] Application settings of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the application settings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def analyze_custom_hostname_slot_with_http_info(resource_group_name, name, slot, host_name = nil, custom_headers = nil) - analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! + def update_application_settings_slot_with_http_info(resource_group_name, name, app_settings, slot, custom_headers = nil) + update_application_settings_slot_async(resource_group_name, name, app_settings, slot, custom_headers).value! end # - # Analyze a custom hostname. + # Replaces the application settings of an app. # - # Analyze a custom hostname. + # Replaces the application settings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. - # @param host_name [String] Custom hostname + # @param name [String] Name of the app. + # @param app_settings [StringDictionary] Application settings of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the application settings for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_name = nil, custom_headers = nil) + def update_application_settings_slot_async(resource_group_name, name, app_settings, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'app_settings is nil' if app_settings.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -9783,18 +11820,27 @@ def analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_nam # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() + request_content = @client.serialize(request_mapper, app_settings) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'hostName' => host_name,'api-version' => api_version}, + query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -9810,7 +11856,7 @@ def analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_nam if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::CustomHostnameAnalysisResult.mapper() + result_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -9824,74 +11870,62 @@ def analyze_custom_hostname_slot_async(resource_group_name, name, slot, host_nam end # - # Applies the configuration settings from the target slot onto the current - # slot. + # Gets the application settings of an app. # - # Applies the configuration settings from the target slot onto the current - # slot. + # Gets the application settings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. - # @param slot [String] Name of the source slot. If a slot is not specified, the - # production slot is used as the source slot. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the application settings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [StringDictionary] operation results. # - def apply_slot_configuration_slot(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) - response = apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers).value! - nil + def list_application_settings_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_application_settings_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? end # - # Applies the configuration settings from the target slot onto the current - # slot. + # Gets the application settings of an app. # - # Applies the configuration settings from the target slot onto the current - # slot. + # Gets the application settings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. - # @param slot [String] Name of the source slot. If a slot is not specified, the - # production slot is used as the source slot. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the application settings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def apply_slot_configuration_slot_with_http_info(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) - apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers).value! + def list_application_settings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_application_settings_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Applies the configuration settings from the target slot onto the current - # slot. + # Gets the application settings of an app. # - # Applies the configuration settings from the target slot onto the current - # slot. + # Gets the application settings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot_swap_entity [CsmSlotEntity] JSON object that contains the target - # slot name. See example. - # @param slot [String] Name of the source slot. If a slot is not specified, the - # production slot is used as the source slot. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the application settings for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_entity, slot, custom_headers = nil) + def list_application_settings_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot_swap_entity is nil' if slot_swap_entity.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -9902,15 +11936,7 @@ def apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_ent # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::CsmSlotEntity.mapper() - request_content = @client.serialize(request_mapper, slot_swap_entity) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list' request_url = @base_url || @client.base_url @@ -9918,7 +11944,6 @@ def apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_ent middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -9934,6 +11959,16 @@ def apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_ent end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -9942,69 +11977,69 @@ def apply_slot_configuration_slot_async(resource_group_name, name, slot_swap_ent end # - # Creates a backup of an app. + # Updates the Authentication / Authorization settings associated with web app. # - # Creates a backup of an app. + # Updates the Authentication / Authorization settings associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param request [BackupRequest] Backup configuration. You can use the JSON - # response from the POST action as input here. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create a backup for the production slot. + # @param name [String] Name of web app + # @param site_auth_settings [SiteAuthSettings] Auth settings associated with + # web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [BackupItem] operation results. + # @return [SiteAuthSettings] operation results. # - def backup_slot(resource_group_name, name, request, slot, custom_headers = nil) - response = backup_slot_async(resource_group_name, name, request, slot, custom_headers).value! + def update_auth_settings_slot(resource_group_name, name, site_auth_settings, slot, custom_headers = nil) + response = update_auth_settings_slot_async(resource_group_name, name, site_auth_settings, slot, custom_headers).value! response.body unless response.nil? end # - # Creates a backup of an app. + # Updates the Authentication / Authorization settings associated with web app. # - # Creates a backup of an app. + # Updates the Authentication / Authorization settings associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param request [BackupRequest] Backup configuration. You can use the JSON - # response from the POST action as input here. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create a backup for the production slot. + # @param name [String] Name of web app + # @param site_auth_settings [SiteAuthSettings] Auth settings associated with + # web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def backup_slot_with_http_info(resource_group_name, name, request, slot, custom_headers = nil) - backup_slot_async(resource_group_name, name, request, slot, custom_headers).value! + def update_auth_settings_slot_with_http_info(resource_group_name, name, site_auth_settings, slot, custom_headers = nil) + update_auth_settings_slot_async(resource_group_name, name, site_auth_settings, slot, custom_headers).value! end # - # Creates a backup of an app. + # Updates the Authentication / Authorization settings associated with web app. # - # Creates a backup of an app. + # Updates the Authentication / Authorization settings associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param request [BackupRequest] Backup configuration. You can use the JSON - # response from the POST action as input here. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create a backup for the production slot. + # @param name [String] Name of web app + # @param site_auth_settings [SiteAuthSettings] Auth settings associated with + # web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def backup_slot_async(resource_group_name, name, request, slot, custom_headers = nil) + def update_auth_settings_slot_async(resource_group_name, name, site_auth_settings, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'request is nil' if request.nil? + fail ArgumentError, 'site_auth_settings is nil' if site_auth_settings.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -10019,11 +12054,11 @@ def backup_slot_async(resource_group_name, name, request, slot, custom_headers = request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() - request_content = @client.serialize(request_mapper, request) + request_mapper = Azure::ARM::Web::Models::SiteAuthSettings.mapper() + request_content = @client.serialize(request_mapper, site_auth_settings) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings' request_url = @base_url || @client.base_url @@ -10035,7 +12070,7 @@ def backup_slot_async(resource_group_name, name, request, slot, custom_headers = headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -10051,7 +12086,7 @@ def backup_slot_async(resource_group_name, name, request, slot, custom_headers = if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::BackupItem.mapper() + result_mapper = Azure::ARM::Web::Models::SiteAuthSettings.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -10065,60 +12100,60 @@ def backup_slot_async(resource_group_name, name, request, slot, custom_headers = end # - # Gets existing backups of an app. + # Gets the Authentication/Authorization settings of an app. # - # Gets existing backups of an app. + # Gets the Authentication/Authorization settings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get backups of the production slot. + # the API will get the settings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [SiteAuthSettings] operation results. # - def list_backups_slot(resource_group_name, name, slot, custom_headers = nil) - first_page = list_backups_slot_as_lazy(resource_group_name, name, slot, custom_headers) - first_page.get_all_items + def get_auth_settings_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? end # - # Gets existing backups of an app. + # Gets the Authentication/Authorization settings of an app. # - # Gets existing backups of an app. + # Gets the Authentication/Authorization settings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get backups of the production slot. + # the API will get the settings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def list_backups_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_backups_slot_async(resource_group_name, name, slot, custom_headers).value! + # + def get_auth_settings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets existing backups of an app. + # Gets the Authentication/Authorization settings of an app. # - # Gets existing backups of an app. + # Gets the Authentication/Authorization settings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get backups of the production slot. + # the API will get the settings for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_backups_slot_async(resource_group_name, name, slot, custom_headers = nil) + def get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -10131,7 +12166,7 @@ def list_backups_slot_async(resource_group_name, name, slot, custom_headers = ni # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list' request_url = @base_url || @client.base_url @@ -10142,7 +12177,7 @@ def list_backups_slot_async(resource_group_name, name, slot, custom_headers = ni headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -10158,7 +12193,7 @@ def list_backups_slot_async(resource_group_name, name, slot, custom_headers = ni if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::BackupItemCollection.mapper() + result_mapper = Azure::ARM::Web::Models::SiteAuthSettings.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -10172,72 +12207,63 @@ def list_backups_slot_async(resource_group_name, name, slot, custom_headers = ni end # - # Discovers an existing app backup that can be restored from a blob in Azure - # storage. + # Updates the backup configuration of an app. # - # Discovers an existing app backup that can be restored from a blob in Azure - # storage. + # Updates the backup configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param request [RestoreRequest] A RestoreRequest object that includes Azure - # storage URL and blog name for discovery of backup. + # @param request [BackupRequest] Edited backup configuration. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will perform discovery for the production slot. + # the API will update the backup configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RestoreRequest] operation results. + # @return [BackupRequest] operation results. # - def discover_restore_slot(resource_group_name, name, request, slot, custom_headers = nil) - response = discover_restore_slot_async(resource_group_name, name, request, slot, custom_headers).value! + def update_backup_configuration_slot(resource_group_name, name, request, slot, custom_headers = nil) + response = update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers).value! response.body unless response.nil? end # - # Discovers an existing app backup that can be restored from a blob in Azure - # storage. + # Updates the backup configuration of an app. # - # Discovers an existing app backup that can be restored from a blob in Azure - # storage. + # Updates the backup configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param request [RestoreRequest] A RestoreRequest object that includes Azure - # storage URL and blog name for discovery of backup. + # @param request [BackupRequest] Edited backup configuration. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will perform discovery for the production slot. + # the API will update the backup configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def discover_restore_slot_with_http_info(resource_group_name, name, request, slot, custom_headers = nil) - discover_restore_slot_async(resource_group_name, name, request, slot, custom_headers).value! + def update_backup_configuration_slot_with_http_info(resource_group_name, name, request, slot, custom_headers = nil) + update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers).value! end # - # Discovers an existing app backup that can be restored from a blob in Azure - # storage. + # Updates the backup configuration of an app. # - # Discovers an existing app backup that can be restored from a blob in Azure - # storage. + # Updates the backup configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param request [RestoreRequest] A RestoreRequest object that includes Azure - # storage URL and blog name for discovery of backup. + # @param request [BackupRequest] Edited backup configuration. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will perform discovery for the production slot. + # the API will update the backup configuration for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def discover_restore_slot_async(resource_group_name, name, request, slot, custom_headers = nil) + def update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'request is nil' if request.nil? @@ -10255,11 +12281,11 @@ def discover_restore_slot_async(resource_group_name, name, request, slot, custom request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::RestoreRequest.mapper() + request_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() request_content = @client.serialize(request_mapper, request) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/discover' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup' request_url = @base_url || @client.base_url @@ -10287,7 +12313,7 @@ def discover_restore_slot_async(resource_group_name, name, request, slot, custom if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RestoreRequest.mapper() + result_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -10301,66 +12327,61 @@ def discover_restore_slot_async(resource_group_name, name, request, slot, custom end # - # Gets a backup of an app by its ID. + # Deletes the backup configuration of an app. # - # Gets a backup of an app by its ID. + # Deletes the backup configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get a backup of the production slot. + # the API will delete the backup configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [BackupItem] operation results. # - def get_backup_status_slot(resource_group_name, name, backup_id, slot, custom_headers = nil) - response = get_backup_status_slot_async(resource_group_name, name, backup_id, slot, custom_headers).value! - response.body unless response.nil? + def delete_backup_configuration_slot(resource_group_name, name, slot, custom_headers = nil) + response = delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! + nil end # - # Gets a backup of an app by its ID. + # Deletes the backup configuration of an app. # - # Gets a backup of an app by its ID. + # Deletes the backup configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get a backup of the production slot. + # the API will delete the backup configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_backup_status_slot_with_http_info(resource_group_name, name, backup_id, slot, custom_headers = nil) - get_backup_status_slot_async(resource_group_name, name, backup_id, slot, custom_headers).value! + def delete_backup_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets a backup of an app by its ID. + # Deletes the backup configuration of an app. # - # Gets a backup of an app by its ID. + # Deletes the backup configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get a backup of the production slot. + # the API will delete the backup configuration for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_backup_status_slot_async(resource_group_name, name, backup_id, slot, custom_headers = nil) + def delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'backup_id is nil' if backup_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -10371,18 +12392,18 @@ def get_backup_status_slot_async(resource_group_name, name, backup_id, slot, cus # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response @@ -10394,16 +12415,6 @@ def get_backup_status_slot_async(resource_group_name, name, backup_id, slot, cus end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::BackupItem.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -10412,65 +12423,62 @@ def get_backup_status_slot_async(resource_group_name, name, backup_id, slot, cus end # - # Deletes a backup of an app by its ID. + # Gets the backup configuration of an app. # - # Deletes a backup of an app by its ID. + # Gets the backup configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete a backup of the production slot. + # the API will get the backup configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [BackupRequest] operation results. # - def delete_backup_slot(resource_group_name, name, backup_id, slot, custom_headers = nil) - response = delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_headers).value! - nil + def get_backup_configuration_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? end # - # Deletes a backup of an app by its ID. + # Gets the backup configuration of an app. # - # Deletes a backup of an app by its ID. + # Gets the backup configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete a backup of the production slot. + # the API will get the backup configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_backup_slot_with_http_info(resource_group_name, name, backup_id, slot, custom_headers = nil) - delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_headers).value! + def get_backup_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Deletes a backup of an app by its ID. + # Gets the backup configuration of an app. # - # Deletes a backup of an app by its ID. + # Gets the backup configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete a backup of the production slot. + # the API will get the backup configuration for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_headers = nil) + def get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'backup_id is nil' if backup_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -10481,29 +12489,39 @@ def delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_ # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 404 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -10512,88 +12530,69 @@ def delete_backup_slot_async(resource_group_name, name, backup_id, slot, custom_ end # - # Gets status of a web app backup that may be in progress, including secrets - # associated with the backup, such as the Azure Storage SAS URL. Also can be - # used to update the SAS URL for the backup if a new URL is passed in the - # request body. + # Replaces the connection strings of an app. # - # Gets status of a web app backup that may be in progress, including secrets - # associated with the backup, such as the Azure Storage SAS URL. Also can be - # used to update the SAS URL for the backup if a new URL is passed in the - # request body. + # Replaces the connection strings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param backup_id [String] Id of backup - # @param request [BackupRequest] Information on backup request - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param connection_strings [ConnectionStringDictionary] Connection strings of + # the app or deployment slot. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the connection settings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [BackupItem] operation results. + # @return [ConnectionStringDictionary] operation results. # - def list_backup_status_secrets_slot(resource_group_name, name, backup_id, request, slot, custom_headers = nil) - response = list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers).value! + def update_connection_strings_slot(resource_group_name, name, connection_strings, slot, custom_headers = nil) + response = update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers).value! response.body unless response.nil? end # - # Gets status of a web app backup that may be in progress, including secrets - # associated with the backup, such as the Azure Storage SAS URL. Also can be - # used to update the SAS URL for the backup if a new URL is passed in the - # request body. + # Replaces the connection strings of an app. # - # Gets status of a web app backup that may be in progress, including secrets - # associated with the backup, such as the Azure Storage SAS URL. Also can be - # used to update the SAS URL for the backup if a new URL is passed in the - # request body. + # Replaces the connection strings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param backup_id [String] Id of backup - # @param request [BackupRequest] Information on backup request - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param connection_strings [ConnectionStringDictionary] Connection strings of + # the app or deployment slot. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the connection settings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_backup_status_secrets_slot_with_http_info(resource_group_name, name, backup_id, request, slot, custom_headers = nil) - list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers).value! + def update_connection_strings_slot_with_http_info(resource_group_name, name, connection_strings, slot, custom_headers = nil) + update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers).value! end # - # Gets status of a web app backup that may be in progress, including secrets - # associated with the backup, such as the Azure Storage SAS URL. Also can be - # used to update the SAS URL for the backup if a new URL is passed in the - # request body. + # Replaces the connection strings of an app. # - # Gets status of a web app backup that may be in progress, including secrets - # associated with the backup, such as the Azure Storage SAS URL. Also can be - # used to update the SAS URL for the backup if a new URL is passed in the - # request body. + # Replaces the connection strings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param backup_id [String] Id of backup - # @param request [BackupRequest] Information on backup request - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param connection_strings [ConnectionStringDictionary] Connection strings of + # the app or deployment slot. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the connection settings for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers = nil) + def update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'backup_id is nil' if backup_id.nil? - fail ArgumentError, 'request is nil' if request.nil? + fail ArgumentError, 'connection_strings is nil' if connection_strings.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -10608,23 +12607,23 @@ def list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() - request_content = @client.serialize(request_mapper, request) + request_mapper = Azure::ARM::Web::Models::ConnectionStringDictionary.mapper() + request_content = @client.serialize(request_mapper, connection_strings) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -10640,7 +12639,7 @@ def list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::BackupItem.mapper() + result_mapper = Azure::ARM::Web::Models::ConnectionStringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -10654,114 +12653,60 @@ def list_backup_status_secrets_slot_async(resource_group_name, name, backup_id, end # - # Restores a specific backup to another app (or deployment slot, if specified). + # Gets the connection strings of an app. # - # Restores a specific backup to another app (or deployment slot, if specified). + # Gets the connection strings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. - # @param request [RestoreRequest] Information on restore request # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will restore a backup of the production slot. + # the API will get the connection settings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RestoreResponse] operation results. + # @return [ConnectionStringDictionary] operation results. # - def restore_slot(resource_group_name, name, backup_id, request, slot, custom_headers = nil) - response = restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers).value! + def list_connection_strings_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_connection_strings_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of the app. - # @param backup_id [String] ID of the backup. - # @param request [RestoreRequest] Information on restore request - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will restore a backup of the production slot. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Concurrent::Promise] promise which provides async access to http - # response. - # - def restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers = nil) - # Send request - promise = begin_restore_slot_async(resource_group_name, name, backup_id, request, slot, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::Web::Models::RestoreResponse.mapper() - parsed_response = @client.deserialize(result_mapper, parsed_response) - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # List the configurations of an app - # - # List the configurations of an app - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Array] operation results. - # - def list_configurations_slot(resource_group_name, name, slot, custom_headers = nil) - first_page = list_configurations_slot_as_lazy(resource_group_name, name, slot, custom_headers) - first_page.get_all_items - end - - # - # List the configurations of an app + # Gets the connection strings of an app. # - # List the configurations of an app + # Gets the connection strings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # the API will get the connection settings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_configurations_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_configurations_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_connection_strings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_connection_strings_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # List the configurations of an app + # Gets the connection strings of an app. # - # List the configurations of an app + # Gets the connection strings of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # the API will get the connection settings for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_configurations_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_connection_strings_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -10774,7 +12719,7 @@ def list_configurations_slot_async(resource_group_name, name, slot, custom_heade # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list' request_url = @base_url || @client.base_url @@ -10785,7 +12730,7 @@ def list_configurations_slot_async(resource_group_name, name, slot, custom_heade headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -10801,7 +12746,7 @@ def list_configurations_slot_async(resource_group_name, name, slot, custom_heade if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteConfigResourceCollection.mapper() + result_mapper = Azure::ARM::Web::Models::ConnectionStringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -10815,66 +12760,62 @@ def list_configurations_slot_async(resource_group_name, name, slot, custom_heade end # - # Replaces the application settings of an app. + # Gets the logging configuration of an app. # - # Replaces the application settings of an app. + # Gets the logging configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param app_settings [StringDictionary] Application settings of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the application settings for the production slot. + # the API will get the logging configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [StringDictionary] operation results. + # @return [SiteLogsConfig] operation results. # - def update_application_settings_slot(resource_group_name, name, app_settings, slot, custom_headers = nil) - response = update_application_settings_slot_async(resource_group_name, name, app_settings, slot, custom_headers).value! + def get_diagnostic_logs_configuration_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Replaces the application settings of an app. + # Gets the logging configuration of an app. # - # Replaces the application settings of an app. + # Gets the logging configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param app_settings [StringDictionary] Application settings of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the application settings for the production slot. + # the API will get the logging configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_application_settings_slot_with_http_info(resource_group_name, name, app_settings, slot, custom_headers = nil) - update_application_settings_slot_async(resource_group_name, name, app_settings, slot, custom_headers).value! + def get_diagnostic_logs_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Replaces the application settings of an app. + # Gets the logging configuration of an app. # - # Replaces the application settings of an app. + # Gets the logging configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param app_settings [StringDictionary] Application settings of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the application settings for the production slot. + # the API will get the logging configuration for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_application_settings_slot_async(resource_group_name, name, app_settings, slot, custom_headers = nil) + def get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'app_settings is nil' if app_settings.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -10885,15 +12826,7 @@ def update_application_settings_slot_async(resource_group_name, name, app_settin # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() - request_content = @client.serialize(request_mapper, app_settings) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs' request_url = @base_url || @client.base_url @@ -10901,11 +12834,10 @@ def update_application_settings_slot_async(resource_group_name, name, app_settin middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:put, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -10921,7 +12853,7 @@ def update_application_settings_slot_async(resource_group_name, name, app_settin if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() + result_mapper = Azure::ARM::Web::Models::SiteLogsConfig.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -10935,62 +12867,69 @@ def update_application_settings_slot_async(resource_group_name, name, app_settin end # - # Gets the application settings of an app. + # Updates the logging configuration of an app. # - # Gets the application settings of an app. + # Updates the logging configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param site_logs_config [SiteLogsConfig] A SiteLogsConfig JSON object that + # contains the logging configuration to change in the "properties" property. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the application settings for the production slot. + # the API will update the logging configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [StringDictionary] operation results. + # @return [SiteLogsConfig] operation results. # - def list_application_settings_slot(resource_group_name, name, slot, custom_headers = nil) - response = list_application_settings_slot_async(resource_group_name, name, slot, custom_headers).value! + def update_diagnostic_logs_config_slot(resource_group_name, name, site_logs_config, slot, custom_headers = nil) + response = update_diagnostic_logs_config_slot_async(resource_group_name, name, site_logs_config, slot, custom_headers).value! response.body unless response.nil? end # - # Gets the application settings of an app. + # Updates the logging configuration of an app. # - # Gets the application settings of an app. + # Updates the logging configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param site_logs_config [SiteLogsConfig] A SiteLogsConfig JSON object that + # contains the logging configuration to change in the "properties" property. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the application settings for the production slot. + # the API will update the logging configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_application_settings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_application_settings_slot_async(resource_group_name, name, slot, custom_headers).value! + def update_diagnostic_logs_config_slot_with_http_info(resource_group_name, name, site_logs_config, slot, custom_headers = nil) + update_diagnostic_logs_config_slot_async(resource_group_name, name, site_logs_config, slot, custom_headers).value! end # - # Gets the application settings of an app. + # Updates the logging configuration of an app. # - # Gets the application settings of an app. + # Updates the logging configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param site_logs_config [SiteLogsConfig] A SiteLogsConfig JSON object that + # contains the logging configuration to change in the "properties" property. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the application settings for the production slot. + # the API will update the logging configuration for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_application_settings_slot_async(resource_group_name, name, slot, custom_headers = nil) + def update_diagnostic_logs_config_slot_async(resource_group_name, name, site_logs_config, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'site_logs_config is nil' if site_logs_config.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -11001,7 +12940,15 @@ def list_application_settings_slot_async(resource_group_name, name, slot, custom # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::SiteLogsConfig.mapper() + request_content = @client.serialize(request_mapper, site_logs_config) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs' request_url = @base_url || @client.base_url @@ -11009,10 +12956,11 @@ def list_application_settings_slot_async(resource_group_name, name, slot, custom middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -11028,7 +12976,7 @@ def list_application_settings_slot_async(resource_group_name, name, slot, custom if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() + result_mapper = Azure::ARM::Web::Models::SiteLogsConfig.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -11042,69 +12990,69 @@ def list_application_settings_slot_async(resource_group_name, name, slot, custom end # - # Updates the Authentication / Authorization settings associated with web app. + # Replaces the metadata of an app. # - # Updates the Authentication / Authorization settings associated with web app. + # Replaces the metadata of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param site_auth_settings [SiteAuthSettings] Auth settings associated with - # web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param metadata [StringDictionary] Edited metadata of the app or deployment + # slot. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the metadata for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteAuthSettings] operation results. + # @return [StringDictionary] operation results. # - def update_auth_settings_slot(resource_group_name, name, site_auth_settings, slot, custom_headers = nil) - response = update_auth_settings_slot_async(resource_group_name, name, site_auth_settings, slot, custom_headers).value! + def update_metadata_slot(resource_group_name, name, metadata, slot, custom_headers = nil) + response = update_metadata_slot_async(resource_group_name, name, metadata, slot, custom_headers).value! response.body unless response.nil? end # - # Updates the Authentication / Authorization settings associated with web app. + # Replaces the metadata of an app. # - # Updates the Authentication / Authorization settings associated with web app. + # Replaces the metadata of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param site_auth_settings [SiteAuthSettings] Auth settings associated with - # web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param metadata [StringDictionary] Edited metadata of the app or deployment + # slot. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the metadata for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_auth_settings_slot_with_http_info(resource_group_name, name, site_auth_settings, slot, custom_headers = nil) - update_auth_settings_slot_async(resource_group_name, name, site_auth_settings, slot, custom_headers).value! + def update_metadata_slot_with_http_info(resource_group_name, name, metadata, slot, custom_headers = nil) + update_metadata_slot_async(resource_group_name, name, metadata, slot, custom_headers).value! end # - # Updates the Authentication / Authorization settings associated with web app. + # Replaces the metadata of an app. # - # Updates the Authentication / Authorization settings associated with web app. + # Replaces the metadata of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param site_auth_settings [SiteAuthSettings] Auth settings associated with - # web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param metadata [StringDictionary] Edited metadata of the app or deployment + # slot. See example. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the metadata for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_auth_settings_slot_async(resource_group_name, name, site_auth_settings, slot, custom_headers = nil) + def update_metadata_slot_async(resource_group_name, name, metadata, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'site_auth_settings is nil' if site_auth_settings.nil? + fail ArgumentError, 'metadata is nil' if metadata.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -11119,11 +13067,11 @@ def update_auth_settings_slot_async(resource_group_name, name, site_auth_setting request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::SiteAuthSettings.mapper() - request_content = @client.serialize(request_mapper, site_auth_settings) + request_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() + request_content = @client.serialize(request_mapper, metadata) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata' request_url = @base_url || @client.base_url @@ -11151,7 +13099,7 @@ def update_auth_settings_slot_async(resource_group_name, name, site_auth_setting if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteAuthSettings.mapper() + result_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -11165,60 +13113,60 @@ def update_auth_settings_slot_async(resource_group_name, name, site_auth_setting end # - # Gets the Authentication/Authorization settings of an app. + # Gets the metadata of an app. # - # Gets the Authentication/Authorization settings of an app. + # Gets the metadata of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the settings for the production slot. + # the API will get the metadata for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteAuthSettings] operation results. + # @return [StringDictionary] operation results. # - def get_auth_settings_slot(resource_group_name, name, slot, custom_headers = nil) - response = get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_metadata_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_metadata_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Gets the Authentication/Authorization settings of an app. + # Gets the metadata of an app. # - # Gets the Authentication/Authorization settings of an app. + # Gets the metadata of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the settings for the production slot. + # the API will get the metadata for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_auth_settings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_metadata_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_metadata_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets the Authentication/Authorization settings of an app. + # Gets the metadata of an app. # - # Gets the Authentication/Authorization settings of an app. + # Gets the metadata of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the settings for the production slot. + # the API will get the metadata for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_metadata_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -11231,7 +13179,7 @@ def get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list' request_url = @base_url || @client.base_url @@ -11258,7 +13206,7 @@ def get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteAuthSettings.mapper() + result_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -11272,66 +13220,116 @@ def get_auth_settings_slot_async(resource_group_name, name, slot, custom_headers end # - # Updates the backup configuration of an app. + # Gets the Git/FTP publishing credentials of an app. # - # Updates the backup configuration of an app. + # Gets the Git/FTP publishing credentials of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param request [BackupRequest] Edited backup configuration. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the backup configuration for the production slot. + # the API will get the publishing credentials for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [BackupRequest] operation results. + # @return [User] operation results. # - def update_backup_configuration_slot(resource_group_name, name, request, slot, custom_headers = nil) - response = update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers).value! + def list_publishing_credentials_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end - # - # Updates the backup configuration of an app. - # - # Updates the backup configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param request [BackupRequest] Edited backup configuration. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the backup configuration for the production slot. + # the API will get the publishing credentials for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers = nil) + # Send request + promise = begin_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::User.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Updates the Push settings associated with web app. + # + # Updates the Push settings associated with web app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param push_settings [PushSettings] Push settings associated with web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PushSettings] operation results. + # + def update_site_push_settings_slot(resource_group_name, name, push_settings, slot, custom_headers = nil) + response = update_site_push_settings_slot_async(resource_group_name, name, push_settings, slot, custom_headers).value! + response.body unless response.nil? + end + + # + # Updates the Push settings associated with web app. + # + # Updates the Push settings associated with web app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param push_settings [PushSettings] Push settings associated with web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_backup_configuration_slot_with_http_info(resource_group_name, name, request, slot, custom_headers = nil) - update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers).value! + def update_site_push_settings_slot_with_http_info(resource_group_name, name, push_settings, slot, custom_headers = nil) + update_site_push_settings_slot_async(resource_group_name, name, push_settings, slot, custom_headers).value! end # - # Updates the backup configuration of an app. + # Updates the Push settings associated with web app. # - # Updates the backup configuration of an app. + # Updates the Push settings associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param request [BackupRequest] Edited backup configuration. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the backup configuration for the production slot. + # @param name [String] Name of web app + # @param push_settings [PushSettings] Push settings associated with web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers = nil) + def update_site_push_settings_slot_async(resource_group_name, name, push_settings, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'request is nil' if request.nil? + fail ArgumentError, 'push_settings is nil' if push_settings.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -11346,11 +13344,11 @@ def update_backup_configuration_slot_async(resource_group_name, name, request, s request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() - request_content = @client.serialize(request_mapper, request) + request_mapper = Azure::ARM::Web::Models::PushSettings.mapper() + request_content = @client.serialize(request_mapper, push_settings) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings' request_url = @base_url || @client.base_url @@ -11378,7 +13376,7 @@ def update_backup_configuration_slot_async(resource_group_name, name, request, s if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() + result_mapper = Azure::ARM::Web::Models::PushSettings.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -11392,59 +13390,60 @@ def update_backup_configuration_slot_async(resource_group_name, name, request, s end # - # Deletes the backup configuration of an app. + # Gets the Push settings associated with web app. # - # Deletes the backup configuration of an app. + # Gets the Push settings associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the backup configuration for the production slot. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [PushSettings] operation results. # - def delete_backup_configuration_slot(resource_group_name, name, slot, custom_headers = nil) - response = delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! - nil + def list_site_push_settings_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_site_push_settings_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? end # - # Deletes the backup configuration of an app. + # Gets the Push settings associated with web app. # - # Deletes the backup configuration of an app. + # Gets the Push settings associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the backup configuration for the production slot. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_backup_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_site_push_settings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_site_push_settings_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Deletes the backup configuration of an app. + # Gets the Push settings associated with web app. # - # Deletes the backup configuration of an app. + # Gets the Push settings associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the backup configuration for the production slot. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_site_push_settings_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -11457,7 +13456,7 @@ def delete_backup_configuration_slot_async(resource_group_name, name, slot, cust # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list' request_url = @base_url || @client.base_url @@ -11468,7 +13467,7 @@ def delete_backup_configuration_slot_async(resource_group_name, name, slot, cust headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -11480,6 +13479,16 @@ def delete_backup_configuration_slot_async(resource_group_name, name, slot, cust end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::PushSettings.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -11488,60 +13497,66 @@ def delete_backup_configuration_slot_async(resource_group_name, name, slot, cust end # - # Gets the backup configuration of an app. + # Gets the configuration of an app, such as platform version and bitness, + # default documents, virtual applications, Always On, etc. # - # Gets the backup configuration of an app. + # Gets the configuration of an app, such as platform version and bitness, + # default documents, virtual applications, Always On, etc. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the backup configuration for the production slot. + # the API will return configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [BackupRequest] operation results. + # @return [SiteConfigResource] operation results. # - def get_backup_configuration_slot(resource_group_name, name, slot, custom_headers = nil) - response = get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_configuration_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Gets the backup configuration of an app. + # Gets the configuration of an app, such as platform version and bitness, + # default documents, virtual applications, Always On, etc. # - # Gets the backup configuration of an app. + # Gets the configuration of an app, such as platform version and bitness, + # default documents, virtual applications, Always On, etc. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the backup configuration for the production slot. + # the API will return configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_backup_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets the backup configuration of an app. + # Gets the configuration of an app, such as platform version and bitness, + # default documents, virtual applications, Always On, etc. # - # Gets the backup configuration of an app. + # Gets the configuration of an app, such as platform version and bitness, + # default documents, virtual applications, Always On, etc. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the backup configuration for the production slot. + # the API will return configuration for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) + def get_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -11554,7 +13569,7 @@ def get_backup_configuration_slot_async(resource_group_name, name, slot, custom_ # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web' request_url = @base_url || @client.base_url @@ -11565,7 +13580,7 @@ def get_backup_configuration_slot_async(resource_group_name, name, slot, custom_ headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -11581,7 +13596,7 @@ def get_backup_configuration_slot_async(resource_group_name, name, slot, custom_ if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::BackupRequest.mapper() + result_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -11595,69 +13610,69 @@ def get_backup_configuration_slot_async(resource_group_name, name, slot, custom_ end # - # Replaces the connection strings of an app. + # Updates the configuration of an app. # - # Replaces the connection strings of an app. + # Updates the configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param connection_strings [ConnectionStringDictionary] Connection strings of - # the app or deployment slot. See example. + # @param site_config [SiteConfigResource] JSON representation of a SiteConfig + # object. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the connection settings for the production slot. + # the API will update configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ConnectionStringDictionary] operation results. + # @return [SiteConfigResource] operation results. # - def update_connection_strings_slot(resource_group_name, name, connection_strings, slot, custom_headers = nil) - response = update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers).value! + def create_or_update_configuration_slot(resource_group_name, name, site_config, slot, custom_headers = nil) + response = create_or_update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers).value! response.body unless response.nil? end # - # Replaces the connection strings of an app. + # Updates the configuration of an app. # - # Replaces the connection strings of an app. + # Updates the configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param connection_strings [ConnectionStringDictionary] Connection strings of - # the app or deployment slot. See example. + # @param site_config [SiteConfigResource] JSON representation of a SiteConfig + # object. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the connection settings for the production slot. + # the API will update configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_connection_strings_slot_with_http_info(resource_group_name, name, connection_strings, slot, custom_headers = nil) - update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers).value! + def create_or_update_configuration_slot_with_http_info(resource_group_name, name, site_config, slot, custom_headers = nil) + create_or_update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers).value! end # - # Replaces the connection strings of an app. + # Updates the configuration of an app. # - # Replaces the connection strings of an app. + # Updates the configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param connection_strings [ConnectionStringDictionary] Connection strings of - # the app or deployment slot. See example. + # @param site_config [SiteConfigResource] JSON representation of a SiteConfig + # object. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the connection settings for the production slot. + # the API will update configuration for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers = nil) + def create_or_update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'connection_strings is nil' if connection_strings.nil? + fail ArgumentError, 'site_config is nil' if site_config.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -11672,11 +13687,11 @@ def update_connection_strings_slot_async(resource_group_name, name, connection_s request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::ConnectionStringDictionary.mapper() - request_content = @client.serialize(request_mapper, connection_strings) + request_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() + request_content = @client.serialize(request_mapper, site_config) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web' request_url = @base_url || @client.base_url @@ -11704,7 +13719,7 @@ def update_connection_strings_slot_async(resource_group_name, name, connection_s if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ConnectionStringDictionary.mapper() + result_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -11718,62 +13733,69 @@ def update_connection_strings_slot_async(resource_group_name, name, connection_s end # - # Gets the connection strings of an app. + # Updates the configuration of an app. # - # Gets the connection strings of an app. + # Updates the configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param site_config [SiteConfigResource] JSON representation of a SiteConfig + # object. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the connection settings for the production slot. + # the API will update configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ConnectionStringDictionary] operation results. + # @return [SiteConfigResource] operation results. # - def list_connection_strings_slot(resource_group_name, name, slot, custom_headers = nil) - response = list_connection_strings_slot_async(resource_group_name, name, slot, custom_headers).value! + def update_configuration_slot(resource_group_name, name, site_config, slot, custom_headers = nil) + response = update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers).value! response.body unless response.nil? end # - # Gets the connection strings of an app. + # Updates the configuration of an app. # - # Gets the connection strings of an app. + # Updates the configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param site_config [SiteConfigResource] JSON representation of a SiteConfig + # object. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the connection settings for the production slot. + # the API will update configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_connection_strings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_connection_strings_slot_async(resource_group_name, name, slot, custom_headers).value! + def update_configuration_slot_with_http_info(resource_group_name, name, site_config, slot, custom_headers = nil) + update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers).value! end # - # Gets the connection strings of an app. + # Updates the configuration of an app. # - # Gets the connection strings of an app. + # Updates the configuration of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param site_config [SiteConfigResource] JSON representation of a SiteConfig + # object. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the connection settings for the production slot. + # the API will update configuration for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_connection_strings_slot_async(resource_group_name, name, slot, custom_headers = nil) + def update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'site_config is nil' if site_config.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -11784,7 +13806,15 @@ def list_connection_strings_slot_async(resource_group_name, name, slot, custom_h # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() + request_content = @client.serialize(request_mapper, site_config) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web' request_url = @base_url || @client.base_url @@ -11792,10 +13822,11 @@ def list_connection_strings_slot_async(resource_group_name, name, slot, custom_h middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response @@ -11811,7 +13842,7 @@ def list_connection_strings_slot_async(resource_group_name, name, slot, custom_h if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ConnectionStringDictionary.mapper() + result_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -11825,60 +13856,66 @@ def list_connection_strings_slot_async(resource_group_name, name, slot, custom_h end # - # Gets the logging configuration of an app. + # Gets a list of web app configuration snapshots identifiers. Each element of + # the list contains a timestamp and the ID of the snapshot. # - # Gets the logging configuration of an app. + # Gets a list of web app configuration snapshots identifiers. Each element of + # the list contains a timestamp and the ID of the snapshot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the logging configuration for the production slot. + # the API will return configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteLogsConfig] operation results. + # @return [Array] operation results. # - def get_diagnostic_logs_configuration_slot(resource_group_name, name, slot, custom_headers = nil) - response = get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_configuration_snapshot_info_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Gets the logging configuration of an app. + # Gets a list of web app configuration snapshots identifiers. Each element of + # the list contains a timestamp and the ID of the snapshot. # - # Gets the logging configuration of an app. + # Gets a list of web app configuration snapshots identifiers. Each element of + # the list contains a timestamp and the ID of the snapshot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the logging configuration for the production slot. + # the API will return configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_diagnostic_logs_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_configuration_snapshot_info_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets the logging configuration of an app. + # Gets a list of web app configuration snapshots identifiers. Each element of + # the list contains a timestamp and the ID of the snapshot. # - # Gets the logging configuration of an app. + # Gets a list of web app configuration snapshots identifiers. Each element of + # the list contains a timestamp and the ID of the snapshot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the logging configuration for the production slot. + # the API will return configuration for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -11891,7 +13928,7 @@ def get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots' request_url = @base_url || @client.base_url @@ -11918,7 +13955,21 @@ def get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteLogsConfig.mapper() + result_mapper = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'SiteConfigurationSnapshotInfoElementType', + type: { + name: 'Composite', + class_name: 'SiteConfigurationSnapshotInfo' + } + } + } + } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -11932,69 +13983,66 @@ def get_diagnostic_logs_configuration_slot_async(resource_group_name, name, slot end # - # Updates the logging configuration of an app. + # Gets a snapshot of the configuration of an app at a previous point in time. # - # Updates the logging configuration of an app. + # Gets a snapshot of the configuration of an app at a previous point in time. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_logs_config [SiteLogsConfig] A SiteLogsConfig JSON object that - # contains the logging configuration to change in the "properties" property. + # @param snapshot_id [String] The ID of the snapshot to read. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the logging configuration for the production slot. + # the API will return configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteLogsConfig] operation results. + # @return [SiteConfigResource] operation results. # - def update_diagnostic_logs_config_slot(resource_group_name, name, site_logs_config, slot, custom_headers = nil) - response = update_diagnostic_logs_config_slot_async(resource_group_name, name, site_logs_config, slot, custom_headers).value! + def get_configuration_snapshot_slot(resource_group_name, name, snapshot_id, slot, custom_headers = nil) + response = get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers).value! response.body unless response.nil? end # - # Updates the logging configuration of an app. + # Gets a snapshot of the configuration of an app at a previous point in time. # - # Updates the logging configuration of an app. + # Gets a snapshot of the configuration of an app at a previous point in time. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_logs_config [SiteLogsConfig] A SiteLogsConfig JSON object that - # contains the logging configuration to change in the "properties" property. + # @param snapshot_id [String] The ID of the snapshot to read. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the logging configuration for the production slot. + # the API will return configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_diagnostic_logs_config_slot_with_http_info(resource_group_name, name, site_logs_config, slot, custom_headers = nil) - update_diagnostic_logs_config_slot_async(resource_group_name, name, site_logs_config, slot, custom_headers).value! + def get_configuration_snapshot_slot_with_http_info(resource_group_name, name, snapshot_id, slot, custom_headers = nil) + get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers).value! end # - # Updates the logging configuration of an app. + # Gets a snapshot of the configuration of an app at a previous point in time. # - # Updates the logging configuration of an app. + # Gets a snapshot of the configuration of an app at a previous point in time. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_logs_config [SiteLogsConfig] A SiteLogsConfig JSON object that - # contains the logging configuration to change in the "properties" property. + # @param snapshot_id [String] The ID of the snapshot to read. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the logging configuration for the production slot. + # the API will return configuration for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_diagnostic_logs_config_slot_async(resource_group_name, name, site_logs_config, slot, custom_headers = nil) + def get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'site_logs_config is nil' if site_logs_config.nil? + fail ArgumentError, 'snapshot_id is nil' if snapshot_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -12005,27 +14053,18 @@ def update_diagnostic_logs_config_slot_async(resource_group_name, name, site_log # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::SiteLogsConfig.mapper() - request_content = @client.serialize(request_mapper, site_logs_config) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'snapshotId' => snapshot_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:put, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -12041,7 +14080,7 @@ def update_diagnostic_logs_config_slot_async(resource_group_name, name, site_log if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteLogsConfig.mapper() + result_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -12055,121 +14094,98 @@ def update_diagnostic_logs_config_slot_async(resource_group_name, name, site_log end # - # Replaces the metadata of an app. + # Reverts the configuration of an app to a previous snapshot. # - # Replaces the metadata of an app. + # Reverts the configuration of an app to a previous snapshot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param metadata [StringDictionary] Edited metadata of the app or deployment - # slot. See example. + # @param snapshot_id [String] The ID of the snapshot to read. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the metadata for the production slot. + # the API will return configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [StringDictionary] operation results. # - def update_metadata_slot(resource_group_name, name, metadata, slot, custom_headers = nil) - response = update_metadata_slot_async(resource_group_name, name, metadata, slot, custom_headers).value! - response.body unless response.nil? + def recover_site_configuration_snapshot_slot(resource_group_name, name, snapshot_id, slot, custom_headers = nil) + response = recover_site_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers).value! + nil end # - # Replaces the metadata of an app. + # Reverts the configuration of an app to a previous snapshot. # - # Replaces the metadata of an app. + # Reverts the configuration of an app to a previous snapshot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param metadata [StringDictionary] Edited metadata of the app or deployment - # slot. See example. + # @param snapshot_id [String] The ID of the snapshot to read. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the metadata for the production slot. + # the API will return configuration for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_metadata_slot_with_http_info(resource_group_name, name, metadata, slot, custom_headers = nil) - update_metadata_slot_async(resource_group_name, name, metadata, slot, custom_headers).value! + def recover_site_configuration_snapshot_slot_with_http_info(resource_group_name, name, snapshot_id, slot, custom_headers = nil) + recover_site_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers).value! end # - # Replaces the metadata of an app. + # Reverts the configuration of an app to a previous snapshot. # - # Replaces the metadata of an app. + # Reverts the configuration of an app to a previous snapshot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param metadata [StringDictionary] Edited metadata of the app or deployment - # slot. See example. + # @param snapshot_id [String] The ID of the snapshot to read. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the metadata for the production slot. + # the API will return configuration for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_metadata_slot_async(resource_group_name, name, metadata, slot, custom_headers = nil) + def recover_site_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'metadata is nil' if metadata.nil? + fail ArgumentError, 'snapshot_id is nil' if snapshot_id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - api_version = '2016-08-01' - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() - request_content = @client.serialize(request_mapper, metadata) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + api_version = '2016-08-01' - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata' + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'snapshotId' => snapshot_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:put, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -12178,60 +14194,66 @@ def update_metadata_slot_async(resource_group_name, name, metadata, slot, custom end # - # Gets the metadata of an app. + # List deployments for an app, or a deployment slot, or for an instance of a + # scaled-out app. # - # Gets the metadata of an app. + # List deployments for an app, or a deployment slot, or for an instance of a + # scaled-out app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the metadata for the production slot. + # the API returns deployments for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [StringDictionary] operation results. + # @return [Array] operation results. # - def list_metadata_slot(resource_group_name, name, slot, custom_headers = nil) - response = list_metadata_slot_async(resource_group_name, name, slot, custom_headers).value! - response.body unless response.nil? + def list_deployments_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_deployments_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items end # - # Gets the metadata of an app. + # List deployments for an app, or a deployment slot, or for an instance of a + # scaled-out app. # - # Gets the metadata of an app. + # List deployments for an app, or a deployment slot, or for an instance of a + # scaled-out app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the metadata for the production slot. + # the API returns deployments for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_metadata_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_metadata_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_deployments_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_deployments_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets the metadata of an app. + # List deployments for an app, or a deployment slot, or for an instance of a + # scaled-out app. # - # Gets the metadata of an app. + # List deployments for an app, or a deployment slot, or for an instance of a + # scaled-out app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the metadata for the production slot. + # the API returns deployments for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_metadata_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_deployments_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -12244,7 +14266,7 @@ def list_metadata_slot_async(resource_group_name, name, slot, custom_headers = n # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments' request_url = @base_url || @client.base_url @@ -12255,7 +14277,7 @@ def list_metadata_slot_async(resource_group_name, name, slot, custom_headers = n headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -12271,7 +14293,7 @@ def list_metadata_slot_async(resource_group_name, name, slot, custom_headers = n if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::StringDictionary.mapper() + result_mapper = Azure::ARM::Web::Models::DeploymentCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -12285,116 +14307,72 @@ def list_metadata_slot_async(resource_group_name, name, slot, custom_headers = n end # - # Gets the Git/FTP publishing credentials of an app. - # - # Gets the Git/FTP publishing credentials of an app. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the publishing credentials for the production slot. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [User] operation results. + # Get a deployment by its ID for an app, a specific deployment slot, and/or a + # specific scaled-out instance. # - def list_publishing_credentials_slot(resource_group_name, name, slot, custom_headers = nil) - response = list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers).value! - response.body unless response.nil? - end - + # Get a deployment by its ID for an app, a specific deployment slot, and/or a + # specific scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the publishing credentials for the production slot. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [Concurrent::Promise] promise which provides async access to http - # response. - # - def list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers = nil) - # Send request - promise = begin_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers) - - promise = promise.then do |response| - # Defining deserialization method. - deserialize_method = lambda do |parsed_response| - result_mapper = Azure::ARM::Web::Models::User.mapper() - parsed_response = @client.deserialize(result_mapper, parsed_response) - end - - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # Updates the Push settings associated with web app. - # - # Updates the Push settings associated with web app. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of web app - # @param push_settings [PushSettings] Push settings associated with web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # the API gets a deployment for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PushSettings] operation results. + # @return [Deployment] operation results. # - def update_site_push_settings_slot(resource_group_name, name, push_settings, slot, custom_headers = nil) - response = update_site_push_settings_slot_async(resource_group_name, name, push_settings, slot, custom_headers).value! + def get_deployment_slot(resource_group_name, name, id, slot, custom_headers = nil) + response = get_deployment_slot_async(resource_group_name, name, id, slot, custom_headers).value! response.body unless response.nil? end # - # Updates the Push settings associated with web app. + # Get a deployment by its ID for an app, a specific deployment slot, and/or a + # specific scaled-out instance. # - # Updates the Push settings associated with web app. + # Get a deployment by its ID for an app, a specific deployment slot, and/or a + # specific scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param push_settings [PushSettings] Push settings associated with web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param id [String] Deployment ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API gets a deployment for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_site_push_settings_slot_with_http_info(resource_group_name, name, push_settings, slot, custom_headers = nil) - update_site_push_settings_slot_async(resource_group_name, name, push_settings, slot, custom_headers).value! + def get_deployment_slot_with_http_info(resource_group_name, name, id, slot, custom_headers = nil) + get_deployment_slot_async(resource_group_name, name, id, slot, custom_headers).value! end # - # Updates the Push settings associated with web app. + # Get a deployment by its ID for an app, a specific deployment slot, and/or a + # specific scaled-out instance. # - # Updates the Push settings associated with web app. + # Get a deployment by its ID for an app, a specific deployment slot, and/or a + # specific scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param push_settings [PushSettings] Push settings associated with web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param id [String] Deployment ID. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API gets a deployment for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_site_push_settings_slot_async(resource_group_name, name, push_settings, slot, custom_headers = nil) + def get_deployment_slot_async(resource_group_name, name, id, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'push_settings is nil' if push_settings.nil? + fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -12405,27 +14383,18 @@ def update_site_push_settings_slot_async(resource_group_name, name, push_setting # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::PushSettings.mapper() - request_content = @client.serialize(request_mapper, push_settings) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:put, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -12441,7 +14410,7 @@ def update_site_push_settings_slot_async(resource_group_name, name, push_setting if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PushSettings.mapper() + result_mapper = Azure::ARM::Web::Models::Deployment.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -12455,63 +14424,77 @@ def update_site_push_settings_slot_async(resource_group_name, name, push_setting end # - # Gets the Push settings associated with web app. + # Create a deployment for an app, a specific deployment slot, and/or a specific + # scaled-out instance. # - # Gets the Push settings associated with web app. + # Create a deployment for an app, a specific deployment slot, and/or a specific + # scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param id [String] ID of an existing deployment. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API creates a deployment for the production slot. + # @param deployment [Deployment] Deployment details. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PushSettings] operation results. + # @return [Deployment] operation results. # - def list_site_push_settings_slot(resource_group_name, name, slot, custom_headers = nil) - response = list_site_push_settings_slot_async(resource_group_name, name, slot, custom_headers).value! + def create_deployment_slot(resource_group_name, name, id, slot, deployment, custom_headers = nil) + response = create_deployment_slot_async(resource_group_name, name, id, slot, deployment, custom_headers).value! response.body unless response.nil? end # - # Gets the Push settings associated with web app. + # Create a deployment for an app, a specific deployment slot, and/or a specific + # scaled-out instance. # - # Gets the Push settings associated with web app. + # Create a deployment for an app, a specific deployment slot, and/or a specific + # scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param id [String] ID of an existing deployment. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API creates a deployment for the production slot. + # @param deployment [Deployment] Deployment details. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_site_push_settings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_site_push_settings_slot_async(resource_group_name, name, slot, custom_headers).value! + def create_deployment_slot_with_http_info(resource_group_name, name, id, slot, deployment, custom_headers = nil) + create_deployment_slot_async(resource_group_name, name, id, slot, deployment, custom_headers).value! end # - # Gets the Push settings associated with web app. + # Create a deployment for an app, a specific deployment slot, and/or a specific + # scaled-out instance. # - # Gets the Push settings associated with web app. + # Create a deployment for an app, a specific deployment slot, and/or a specific + # scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param id [String] ID of an existing deployment. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API creates a deployment for the production slot. + # @param deployment [Deployment] Deployment details. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_site_push_settings_slot_async(resource_group_name, name, slot, custom_headers = nil) + def create_deployment_slot_async(resource_group_name, name, id, slot, deployment, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'deployment is nil' if deployment.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -12521,18 +14504,27 @@ def list_site_push_settings_slot_async(resource_group_name, name, slot, custom_h # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::Deployment.mapper() + request_content = @client.serialize(request_mapper, deployment) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -12548,7 +14540,7 @@ def list_site_push_settings_slot_async(resource_group_name, name, slot, custom_h if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PushSettings.mapper() + result_mapper = Azure::ARM::Web::Models::Deployment.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -12562,68 +14554,71 @@ def list_site_push_settings_slot_async(resource_group_name, name, slot, custom_h end # - # Gets the configuration of an app, such as platform version and bitness, - # default documents, virtual applications, Always On, etc. + # Delete a deployment by its ID for an app, a specific deployment slot, and/or + # a specific scaled-out instance. # - # Gets the configuration of an app, such as platform version and bitness, - # default documents, virtual applications, Always On, etc. + # Delete a deployment by its ID for an app, a specific deployment slot, and/or + # a specific scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # the API deletes a deployment for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteConfigResource] operation results. # - def get_configuration_slot(resource_group_name, name, slot, custom_headers = nil) - response = get_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! - response.body unless response.nil? + def delete_deployment_slot(resource_group_name, name, id, slot, custom_headers = nil) + response = delete_deployment_slot_async(resource_group_name, name, id, slot, custom_headers).value! + nil end # - # Gets the configuration of an app, such as platform version and bitness, - # default documents, virtual applications, Always On, etc. + # Delete a deployment by its ID for an app, a specific deployment slot, and/or + # a specific scaled-out instance. # - # Gets the configuration of an app, such as platform version and bitness, - # default documents, virtual applications, Always On, etc. + # Delete a deployment by its ID for an app, a specific deployment slot, and/or + # a specific scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # the API deletes a deployment for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - get_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! + def delete_deployment_slot_with_http_info(resource_group_name, name, id, slot, custom_headers = nil) + delete_deployment_slot_async(resource_group_name, name, id, slot, custom_headers).value! end # - # Gets the configuration of an app, such as platform version and bitness, - # default documents, virtual applications, Always On, etc. + # Delete a deployment by its ID for an app, a specific deployment slot, and/or + # a specific scaled-out instance. # - # Gets the configuration of an app, such as platform version and bitness, - # default documents, virtual applications, Always On, etc. + # Delete a deployment by its ID for an app, a specific deployment slot, and/or + # a specific scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # the API deletes a deployment for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) + def delete_deployment_slot_async(resource_group_name, name, id, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -12634,39 +14629,29 @@ def get_configuration_slot_async(resource_group_name, name, slot, custom_headers # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -12675,69 +14660,62 @@ def get_configuration_slot_async(resource_group_name, name, slot, custom_headers end # - # Updates the configuration of an app. + # Lists ownership identifiers for domain associated with web app. # - # Updates the configuration of an app. + # Lists ownership identifiers for domain associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_config [SiteConfigResource] JSON representation of a SiteConfig - # object. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update configuration for the production slot. + # the API will delete the binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteConfigResource] operation results. + # @return [Array] operation results. # - def create_or_update_configuration_slot(resource_group_name, name, site_config, slot, custom_headers = nil) - response = create_or_update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers).value! - response.body unless response.nil? + def list_domain_ownership_identifiers_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_domain_ownership_identifiers_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items end # - # Updates the configuration of an app. + # Lists ownership identifiers for domain associated with web app. # - # Updates the configuration of an app. + # Lists ownership identifiers for domain associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_config [SiteConfigResource] JSON representation of a SiteConfig - # object. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update configuration for the production slot. + # the API will delete the binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_configuration_slot_with_http_info(resource_group_name, name, site_config, slot, custom_headers = nil) - create_or_update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers).value! + def list_domain_ownership_identifiers_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Updates the configuration of an app. + # Lists ownership identifiers for domain associated with web app. # - # Updates the configuration of an app. + # Lists ownership identifiers for domain associated with web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_config [SiteConfigResource] JSON representation of a SiteConfig - # object. See example. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update configuration for the production slot. + # the API will delete the binding for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers = nil) + def list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'site_config is nil' if site_config.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -12748,15 +14726,7 @@ def create_or_update_configuration_slot_async(resource_group_name, name, site_co # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() - request_content = @client.serialize(request_mapper, site_config) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers' request_url = @base_url || @client.base_url @@ -12764,11 +14734,10 @@ def create_or_update_configuration_slot_async(resource_group_name, name, site_co middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:put, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -12784,7 +14753,7 @@ def create_or_update_configuration_slot_async(resource_group_name, name, site_co if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() + result_mapper = Azure::ARM::Web::Models::IdentifierCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -12798,69 +14767,69 @@ def create_or_update_configuration_slot_async(resource_group_name, name, site_co end # - # Updates the configuration of an app. + # Get domain ownership identifier for web app. # - # Updates the configuration of an app. + # Get domain ownership identifier for web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_config [SiteConfigResource] JSON representation of a SiteConfig - # object. See example. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update configuration for the production slot. + # the API will delete the binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteConfigResource] operation results. + # @return [Identifier] operation results. # - def update_configuration_slot(resource_group_name, name, site_config, slot, custom_headers = nil) - response = update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers).value! + def get_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) + response = get_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers).value! response.body unless response.nil? end # - # Updates the configuration of an app. + # Get domain ownership identifier for web app. # - # Updates the configuration of an app. + # Get domain ownership identifier for web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_config [SiteConfigResource] JSON representation of a SiteConfig - # object. See example. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update configuration for the production slot. + # the API will delete the binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_configuration_slot_with_http_info(resource_group_name, name, site_config, slot, custom_headers = nil) - update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers).value! + def get_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) + get_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers).value! end # - # Updates the configuration of an app. + # Get domain ownership identifier for web app. # - # Updates the configuration of an app. + # Get domain ownership identifier for web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param site_config [SiteConfigResource] JSON representation of a SiteConfig - # object. See example. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update configuration for the production slot. + # the API will delete the binding for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_configuration_slot_async(resource_group_name, name, site_config, slot, custom_headers = nil) + def get_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'site_config is nil' if site_config.nil? + fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -12871,27 +14840,18 @@ def update_configuration_slot_async(resource_group_name, name, site_config, slot # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() - request_content = @client.serialize(request_mapper, site_config) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:patch, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -12907,7 +14867,7 @@ def update_configuration_slot_async(resource_group_name, name, site_config, slot if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() + result_mapper = Azure::ARM::Web::Models::Identifier.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -12921,68 +14881,82 @@ def update_configuration_slot_async(resource_group_name, name, site_config, slot end # - # Gets a list of web app configuration snapshots identifiers. Each element of - # the list contains a timestamp and the ID of the snapshot. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # - # Gets a list of web app configuration snapshots identifiers. Each element of - # the list contains a timestamp and the ID of the snapshot. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. + # @param domain_ownership_identifier [Identifier] A JSON representation of the + # domain ownership properties. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # the API will delete the binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [Identifier] operation results. # - def list_configuration_snapshot_info_slot(resource_group_name, name, slot, custom_headers = nil) - response = list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, custom_headers).value! + def create_or_update_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) + response = create_or_update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers).value! response.body unless response.nil? end # - # Gets a list of web app configuration snapshots identifiers. Each element of - # the list contains a timestamp and the ID of the snapshot. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # - # Gets a list of web app configuration snapshots identifiers. Each element of - # the list contains a timestamp and the ID of the snapshot. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. + # @param domain_ownership_identifier [Identifier] A JSON representation of the + # domain ownership properties. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # the API will delete the binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_configuration_snapshot_info_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, custom_headers).value! + def create_or_update_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) + create_or_update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers).value! end # - # Gets a list of web app configuration snapshots identifiers. Each element of - # the list contains a timestamp and the ID of the snapshot. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # - # Gets a list of web app configuration snapshots identifiers. Each element of - # the list contains a timestamp and the ID of the snapshot. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. + # @param domain_ownership_identifier [Identifier] A JSON representation of the + # domain ownership properties. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # the API will delete the binding for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, custom_headers = nil) + def create_or_update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? + fail ArgumentError, 'domain_ownership_identifier is nil' if domain_ownership_identifier.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -12993,18 +14967,27 @@ def list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::Identifier.mapper() + request_content = @client.serialize(request_mapper, domain_ownership_identifier) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -13020,21 +15003,7 @@ def list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = { - required: false, - serialized_name: 'parsed_response', - type: { - name: 'Sequence', - element: { - required: false, - serialized_name: 'SiteConfigurationSnapshotInfoElementType', - type: { - name: 'Composite', - class_name: 'SiteConfigurationSnapshotInfo' - } - } - } - } + result_mapper = Azure::ARM::Web::Models::Identifier.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -13048,66 +15017,68 @@ def list_configuration_snapshot_info_slot_async(resource_group_name, name, slot, end # - # Gets a snapshot of the configuration of an app at a previous point in time. + # Deletes a domain ownership identifier for a web app. # - # Gets a snapshot of the configuration of an app at a previous point in time. + # Deletes a domain ownership identifier for a web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param snapshot_id [String] The ID of the snapshot to read. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # the API will delete the binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteConfigResource] operation results. # - def get_configuration_snapshot_slot(resource_group_name, name, snapshot_id, slot, custom_headers = nil) - response = get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers).value! - response.body unless response.nil? + def delete_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) + response = delete_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers).value! + nil end # - # Gets a snapshot of the configuration of an app at a previous point in time. + # Deletes a domain ownership identifier for a web app. # - # Gets a snapshot of the configuration of an app at a previous point in time. + # Deletes a domain ownership identifier for a web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param snapshot_id [String] The ID of the snapshot to read. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # the API will delete the binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_configuration_snapshot_slot_with_http_info(resource_group_name, name, snapshot_id, slot, custom_headers = nil) - get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers).value! + def delete_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) + delete_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers).value! end # - # Gets a snapshot of the configuration of an app at a previous point in time. + # Deletes a domain ownership identifier for a web app. # - # Gets a snapshot of the configuration of an app at a previous point in time. + # Deletes a domain ownership identifier for a web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param snapshot_id [String] The ID of the snapshot to read. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # the API will delete the binding for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers = nil) + def delete_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'snapshot_id is nil' if snapshot_id.nil? + fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -13118,39 +15089,29 @@ def get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'snapshotId' => snapshot_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteConfigResource.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -13159,65 +15120,82 @@ def get_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id end # - # Reverts the configuration of an app to a previous snapshot. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # - # Reverts the configuration of an app to a previous snapshot. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param snapshot_id [String] The ID of the snapshot to read. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. + # @param domain_ownership_identifier [Identifier] A JSON representation of the + # domain ownership properties. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # the API will delete the binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [Identifier] operation results. # - def recover_site_configuration_snapshot_slot(resource_group_name, name, snapshot_id, slot, custom_headers = nil) - response = recover_site_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers).value! - nil + def update_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) + response = update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers).value! + response.body unless response.nil? end # - # Reverts the configuration of an app to a previous snapshot. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # - # Reverts the configuration of an app to a previous snapshot. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param snapshot_id [String] The ID of the snapshot to read. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. + # @param domain_ownership_identifier [Identifier] A JSON representation of the + # domain ownership properties. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # the API will delete the binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def recover_site_configuration_snapshot_slot_with_http_info(resource_group_name, name, snapshot_id, slot, custom_headers = nil) - recover_site_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers).value! + def update_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) + update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers).value! end # - # Reverts the configuration of an app to a previous snapshot. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # - # Reverts the configuration of an app to a previous snapshot. + # Creates a domain ownership identifier for web app, or updates an existing + # ownership identifier. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param snapshot_id [String] The ID of the snapshot to read. + # @param domain_ownership_identifier_name [String] Name of domain ownership + # identifier. + # @param domain_ownership_identifier [Identifier] A JSON representation of the + # domain ownership properties. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will return configuration for the production slot. + # the API will delete the binding for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def recover_site_configuration_snapshot_slot_async(resource_group_name, name, snapshot_id, slot, custom_headers = nil) + def update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'snapshot_id is nil' if snapshot_id.nil? + fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? + fail ArgumentError, 'domain_ownership_identifier is nil' if domain_ownership_identifier.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -13228,29 +15206,48 @@ def recover_site_configuration_snapshot_slot_async(resource_group_name, name, sn # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::Identifier.mapper() + request_content = @client.serialize(request_mapper, domain_ownership_identifier) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'snapshotId' => snapshot_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::Identifier.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -13259,66 +15256,60 @@ def recover_site_configuration_snapshot_slot_async(resource_group_name, name, sn end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Invoke the MSDeploy web app extension as pass-through API # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Invoke the MSDeploy web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API returns deployments for the production slot. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [MSDeployStatus] operation results. # - def list_deployments_slot(resource_group_name, name, slot, custom_headers = nil) - first_page = list_deployments_slot_as_lazy(resource_group_name, name, slot, custom_headers) - first_page.get_all_items + def get_msdeploy_status_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_msdeploy_status_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Invoke the MSDeploy web app extension as pass-through API # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Invoke the MSDeploy web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API returns deployments for the production slot. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_deployments_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_deployments_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_msdeploy_status_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_msdeploy_status_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Invoke the MSDeploy web app extension as pass-through API # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Invoke the MSDeploy web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API returns deployments for the production slot. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_deployments_slot_async(resource_group_name, name, slot, custom_headers = nil) + def get_msdeploy_status_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -13331,7 +15322,7 @@ def list_deployments_slot_async(resource_group_name, name, slot, custom_headers # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy' request_url = @base_url || @client.base_url @@ -13358,7 +15349,7 @@ def list_deployments_slot_async(resource_group_name, name, slot, custom_headers if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::DeploymentCollection.mapper() + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -13372,72 +15363,114 @@ def list_deployments_slot_async(resource_group_name, name, slot, custom_headers end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Invoke the MSDeploy web app extension as pass-through API # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Invoke the MSDeploy web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets a deployment for the production slot. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param msdeploy [MSDeploy] Details of MSDeploy operation # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Deployment] operation results. + # @return [MSDeployStatus] operation results. # - def get_deployment_slot(resource_group_name, name, id, slot, custom_headers = nil) - response = get_deployment_slot_async(resource_group_name, name, id, slot, custom_headers).value! + def create_msdeploy_operation_slot(resource_group_name, name, slot, msdeploy, custom_headers = nil) + response = create_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers).value! response.body unless response.nil? end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param msdeploy [MSDeploy] Details of MSDeploy operation + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers = nil) + # Send request + promise = begin_create_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Invoke the MSDeploy Log web app extension as pass-through API + # + # Invoke the MSDeploy Log web app extension as pass-through API + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MSDeployLog] operation results. + # + def get_msdeploy_log_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_msdeploy_log_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? + end + # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Invoke the MSDeploy Log web app extension as pass-through API + # + # Invoke the MSDeploy Log web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets a deployment for the production slot. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_deployment_slot_with_http_info(resource_group_name, name, id, slot, custom_headers = nil) - get_deployment_slot_async(resource_group_name, name, id, slot, custom_headers).value! + def get_msdeploy_log_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_msdeploy_log_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Invoke the MSDeploy Log web app extension as pass-through API # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Invoke the MSDeploy Log web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets a deployment for the production slot. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_deployment_slot_async(resource_group_name, name, id, slot, custom_headers = nil) + def get_msdeploy_log_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -13448,13 +15481,13 @@ def get_deployment_slot_async(resource_group_name, name, id, slot, custom_header # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -13475,7 +15508,7 @@ def get_deployment_slot_async(resource_group_name, name, id, slot, custom_header if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Deployment.mapper() + result_mapper = Azure::ARM::Web::Models::MSDeployLog.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -13489,77 +15522,63 @@ def get_deployment_slot_async(resource_group_name, name, id, slot, custom_header end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Fetch a short lived token that can be exchanged for a master key. # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Fetch a short lived token that can be exchanged for a master key. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API creates a deployment for the production slot. - # @param deployment [Deployment] Deployment details. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Deployment] operation results. + # @return [String] operation results. # - def create_deployment_slot(resource_group_name, name, id, slot, deployment, custom_headers = nil) - response = create_deployment_slot_async(resource_group_name, name, id, slot, deployment, custom_headers).value! + def get_functions_admin_token_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_functions_admin_token_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Fetch a short lived token that can be exchanged for a master key. # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Fetch a short lived token that can be exchanged for a master key. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API creates a deployment for the production slot. - # @param deployment [Deployment] Deployment details. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_deployment_slot_with_http_info(resource_group_name, name, id, slot, deployment, custom_headers = nil) - create_deployment_slot_async(resource_group_name, name, id, slot, deployment, custom_headers).value! + def get_functions_admin_token_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_functions_admin_token_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Fetch a short lived token that can be exchanged for a master key. # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Fetch a short lived token that can be exchanged for a master key. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API creates a deployment for the production slot. - # @param deployment [Deployment] Deployment details. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_deployment_slot_async(resource_group_name, name, id, slot, deployment, custom_headers = nil) + def get_functions_admin_token_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? - fail ArgumentError, 'deployment is nil' if deployment.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -13569,27 +15588,18 @@ def create_deployment_slot_async(resource_group_name, name, id, slot, deployment # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::Deployment.mapper() - request_content = @client.serialize(request_mapper, deployment) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:put, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -13605,7 +15615,13 @@ def create_deployment_slot_async(resource_group_name, name, id, slot, deployment if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Deployment.mapper() + result_mapper = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'String' + } + } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -13619,71 +15635,62 @@ def create_deployment_slot_async(resource_group_name, name, id, slot, deployment end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Get hostname bindings for an app or a deployment slot. # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Get hostname bindings for an app or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API deletes a deployment for the production slot. + # the API gets hostname bindings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [Array] operation results. # - def delete_deployment_slot(resource_group_name, name, id, slot, custom_headers = nil) - response = delete_deployment_slot_async(resource_group_name, name, id, slot, custom_headers).value! - nil + def list_host_name_bindings_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_host_name_bindings_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Get hostname bindings for an app or a deployment slot. # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Get hostname bindings for an app or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API deletes a deployment for the production slot. + # the API gets hostname bindings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_deployment_slot_with_http_info(resource_group_name, name, id, slot, custom_headers = nil) - delete_deployment_slot_async(resource_group_name, name, id, slot, custom_headers).value! + def list_host_name_bindings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_host_name_bindings_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Get hostname bindings for an app or a deployment slot. # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Get hostname bindings for an app or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API deletes a deployment for the production slot. + # the API gets hostname bindings for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_deployment_slot_async(resource_group_name, name, id, slot, custom_headers = nil) + def list_host_name_bindings_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -13694,29 +15701,39 @@ def delete_deployment_slot_async(resource_group_name, name, id, slot, custom_hea # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::HostNameBindingCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -13725,63 +15742,67 @@ def delete_deployment_slot_async(resource_group_name, name, id, slot, custom_hea end # - # Lists ownership identifiers for domain associated with web app. + # Get the named hostname binding for an app (or deployment slot, if specified). # - # Lists ownership identifiers for domain associated with web app. + # Get the named hostname binding for an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # the API the named binding for the production slot. + # @param host_name [String] Hostname in the hostname binding. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [HostNameBinding] operation results. # - def list_domain_ownership_identifiers_slot(resource_group_name, name, slot, custom_headers = nil) - first_page = list_domain_ownership_identifiers_slot_as_lazy(resource_group_name, name, slot, custom_headers) - first_page.get_all_items + def get_host_name_binding_slot(resource_group_name, name, slot, host_name, custom_headers = nil) + response = get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! + response.body unless response.nil? end # - # Lists ownership identifiers for domain associated with web app. + # Get the named hostname binding for an app (or deployment slot, if specified). # - # Lists ownership identifiers for domain associated with web app. + # Get the named hostname binding for an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # the API the named binding for the production slot. + # @param host_name [String] Hostname in the hostname binding. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_domain_ownership_identifiers_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_host_name_binding_slot_with_http_info(resource_group_name, name, slot, host_name, custom_headers = nil) + get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! end # - # Lists ownership identifiers for domain associated with web app. + # Get the named hostname binding for an app (or deployment slot, if specified). # - # Lists ownership identifiers for domain associated with web app. + # Get the named hostname binding for an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # the API the named binding for the production slot. + # @param host_name [String] Hostname in the hostname binding. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot, custom_headers = nil) + def get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -13791,13 +15812,13 @@ def list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -13818,7 +15839,7 @@ def list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::IdentifierCollection.mapper() + result_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -13832,69 +15853,73 @@ def list_domain_ownership_identifiers_slot_async(resource_group_name, name, slot end # - # Get domain ownership identifier for web app. + # Creates a hostname binding for an app. # - # Get domain ownership identifier for web app. + # Creates a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. + # @param host_name [String] Hostname in the hostname binding. + # @param host_name_binding [HostNameBinding] Binding details. This is the JSON + # representation of a HostNameBinding object. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # the API will create a binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Identifier] operation results. + # @return [HostNameBinding] operation results. # - def get_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) - response = get_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers).value! + def create_or_update_host_name_binding_slot(resource_group_name, name, host_name, host_name_binding, slot, custom_headers = nil) + response = create_or_update_host_name_binding_slot_async(resource_group_name, name, host_name, host_name_binding, slot, custom_headers).value! response.body unless response.nil? end # - # Get domain ownership identifier for web app. + # Creates a hostname binding for an app. # - # Get domain ownership identifier for web app. + # Creates a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. + # @param host_name [String] Hostname in the hostname binding. + # @param host_name_binding [HostNameBinding] Binding details. This is the JSON + # representation of a HostNameBinding object. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # the API will create a binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) - get_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers).value! + def create_or_update_host_name_binding_slot_with_http_info(resource_group_name, name, host_name, host_name_binding, slot, custom_headers = nil) + create_or_update_host_name_binding_slot_async(resource_group_name, name, host_name, host_name_binding, slot, custom_headers).value! end # - # Get domain ownership identifier for web app. + # Creates a hostname binding for an app. # - # Get domain ownership identifier for web app. + # Creates a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. + # @param host_name [String] Hostname in the hostname binding. + # @param host_name_binding [HostNameBinding] Binding details. This is the JSON + # representation of a HostNameBinding object. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # the API will create a binding for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) + def create_or_update_host_name_binding_slot_async(resource_group_name, name, host_name, host_name_binding, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? + fail ArgumentError, 'host_name is nil' if host_name.nil? + fail ArgumentError, 'host_name_binding is nil' if host_name_binding.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -13902,21 +15927,30 @@ def get_domain_ownership_identifier_slot_async(resource_group_name, name, domain request_headers = {} - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() + request_content = @client.serialize(request_mapper, host_name_binding) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -13932,7 +15966,7 @@ def get_domain_ownership_identifier_slot_async(resource_group_name, name, domain if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Identifier.mapper() + result_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -13946,83 +15980,66 @@ def get_domain_ownership_identifier_slot_async(resource_group_name, name, domain end # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Deletes a hostname binding for an app. # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Deletes a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param domain_ownership_identifier [Identifier] A JSON representation of the - # domain ownership properties. # @param slot [String] Name of the deployment slot. If a slot is not specified, # the API will delete the binding for the production slot. + # @param host_name [String] Hostname in the hostname binding. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Identifier] operation results. # - def create_or_update_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) - response = create_or_update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers).value! - response.body unless response.nil? + def delete_host_name_binding_slot(resource_group_name, name, slot, host_name, custom_headers = nil) + response = delete_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! + nil end # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Deletes a hostname binding for an app. # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Deletes a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param domain_ownership_identifier [Identifier] A JSON representation of the - # domain ownership properties. # @param slot [String] Name of the deployment slot. If a slot is not specified, # the API will delete the binding for the production slot. + # @param host_name [String] Hostname in the hostname binding. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) - create_or_update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers).value! + def delete_host_name_binding_slot_with_http_info(resource_group_name, name, slot, host_name, custom_headers = nil) + delete_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! end # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Deletes a hostname binding for an app. # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Deletes a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param domain_ownership_identifier [Identifier] A JSON representation of the - # domain ownership properties. # @param slot [String] Name of the deployment slot. If a slot is not specified, # the API will delete the binding for the production slot. + # @param host_name [String] Hostname in the hostname binding. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) + def delete_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? - fail ArgumentError, 'domain_ownership_identifier is nil' if domain_ownership_identifier.nil? fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -14032,48 +16049,29 @@ def create_or_update_domain_ownership_identifier_slot_async(resource_group_name, # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::Identifier.mapper() - request_content = @client.serialize(request_mapper, domain_ownership_identifier) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:put, path_template, options) + promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Identifier.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -14082,68 +16080,67 @@ def create_or_update_domain_ownership_identifier_slot_async(resource_group_name, end # - # Deletes a domain ownership identifier for a web app. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # - # Deletes a domain ownership identifier for a web app. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection + # @param slot [String] The name of the slot for the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [HybridConnection] operation results. # - def delete_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) - response = delete_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers).value! - nil + def get_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) + response = get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! + response.body unless response.nil? end # - # Deletes a domain ownership identifier for a web app. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # - # Deletes a domain ownership identifier for a web app. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection + # @param slot [String] The name of the slot for the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) - delete_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers).value! + def get_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) + get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! end # - # Deletes a domain ownership identifier for a web app. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # - # Deletes a domain ownership identifier for a web app. + # Retrieves a specific Service Bus Hybrid Connection used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection + # @param slot [String] The name of the slot for the web app. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers = nil) + def get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -14154,29 +16151,39 @@ def delete_domain_ownership_identifier_slot_async(resource_group_name, name, dom # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -14185,82 +16192,74 @@ def delete_domain_ownership_identifier_slot_async(resource_group_name, name, dom end # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Creates a new Hybrid Connection using a Service Bus relay. # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param domain_ownership_identifier [Identifier] A JSON representation of the - # domain ownership properties. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection + # @param slot [String] The name of the slot for the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Identifier] operation results. + # @return [HybridConnection] operation results. # - def update_domain_ownership_identifier_slot(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) - response = update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers).value! + def create_or_update_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) + response = create_or_update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers).value! response.body unless response.nil? end # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Creates a new Hybrid Connection using a Service Bus relay. # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param domain_ownership_identifier [Identifier] A JSON representation of the - # domain ownership properties. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection + # @param slot [String] The name of the slot for the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_domain_ownership_identifier_slot_with_http_info(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) - update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers).value! + def create_or_update_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) + create_or_update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers).value! end # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Creates a new Hybrid Connection using a Service Bus relay. # - # Creates a domain ownership identifier for web app, or updates an existing - # ownership identifier. + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param domain_ownership_identifier_name [String] Name of domain ownership - # identifier. - # @param domain_ownership_identifier [Identifier] A JSON representation of the - # domain ownership properties. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection + # @param slot [String] The name of the slot for the web app. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_domain_ownership_identifier_slot_async(resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers = nil) + def create_or_update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'domain_ownership_identifier_name is nil' if domain_ownership_identifier_name.nil? - fail ArgumentError, 'domain_ownership_identifier is nil' if domain_ownership_identifier.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -14275,23 +16274,23 @@ def update_domain_ownership_identifier_slot_async(resource_group_name, name, dom request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::Identifier.mapper() - request_content = @client.serialize(request_mapper, domain_ownership_identifier) + request_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'domainOwnershipIdentifierName' => domain_ownership_identifier_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:patch, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -14307,7 +16306,7 @@ def update_domain_ownership_identifier_slot_async(resource_group_name, name, dom if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Identifier.mapper() + result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -14321,62 +16320,66 @@ def update_domain_ownership_identifier_slot_async(resource_group_name, name, dom end # - # Get hostname bindings for an app or a deployment slot. + # Removes a Hybrid Connection from this site. # - # Get hostname bindings for an app or a deployment slot. + # Removes a Hybrid Connection from this site. # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets hostname bindings for the production slot. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection + # @param slot [String] The name of the slot for the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. # - def list_host_name_bindings_slot(resource_group_name, name, slot, custom_headers = nil) - first_page = list_host_name_bindings_slot_as_lazy(resource_group_name, name, slot, custom_headers) - first_page.get_all_items + def delete_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) + response = delete_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! + nil end # - # Get hostname bindings for an app or a deployment slot. + # Removes a Hybrid Connection from this site. # - # Get hostname bindings for an app or a deployment slot. + # Removes a Hybrid Connection from this site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets hostname bindings for the production slot. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection + # @param slot [String] The name of the slot for the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_host_name_bindings_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_host_name_bindings_slot_async(resource_group_name, name, slot, custom_headers).value! + def delete_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) + delete_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! end # - # Get hostname bindings for an app or a deployment slot. + # Removes a Hybrid Connection from this site. # - # Get hostname bindings for an app or a deployment slot. + # Removes a Hybrid Connection from this site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets hostname bindings for the production slot. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection + # @param slot [String] The name of the slot for the web app. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_host_name_bindings_slot_async(resource_group_name, name, slot, custom_headers = nil) + def delete_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -14387,39 +16390,29 @@ def list_host_name_bindings_slot_async(resource_group_name, name, slot, custom_h # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HostNameBindingCollection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -14428,67 +16421,75 @@ def list_host_name_bindings_slot_async(resource_group_name, name, slot, custom_h end # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Creates a new Hybrid Connection using a Service Bus relay. # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API the named binding for the production slot. - # @param host_name [String] Hostname in the hostname binding. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection + # @param slot [String] The name of the slot for the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HostNameBinding] operation results. + # @return [HybridConnection] operation results. # - def get_host_name_binding_slot(resource_group_name, name, slot, host_name, custom_headers = nil) - response = get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! + def update_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) + response = update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers).value! response.body unless response.nil? end # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Creates a new Hybrid Connection using a Service Bus relay. # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API the named binding for the production slot. - # @param host_name [String] Hostname in the hostname binding. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection + # @param slot [String] The name of the slot for the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_host_name_binding_slot_with_http_info(resource_group_name, name, slot, host_name, custom_headers = nil) - get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! + def update_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) + update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers).value! end # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Creates a new Hybrid Connection using a Service Bus relay. # - # Get the named hostname binding for an app (or deployment slot, if specified). + # Creates a new Hybrid Connection using a Service Bus relay. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API the named binding for the production slot. - # @param host_name [String] Hostname in the hostname binding. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection + # @param connection_envelope [HybridConnection] The details of the hybrid + # connection + # @param slot [String] The name of the slot for the web app. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers = nil) + def update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? - fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -14498,18 +16499,27 @@ def get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response @@ -14525,7 +16535,7 @@ def get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() + result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -14539,73 +16549,67 @@ def get_host_name_binding_slot_async(resource_group_name, name, slot, host_name, end # - # Creates a hostname binding for an app. + # Gets the send key name and value for a Hybrid Connection. # - # Creates a hostname binding for an app. + # Gets the send key name and value for a Hybrid Connection. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. - # @param host_name_binding [HostNameBinding] Binding details. This is the JSON - # representation of a HostNameBinding object. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create a binding for the production slot. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection + # @param slot [String] The name of the slot for the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HostNameBinding] operation results. + # @return [HybridConnectionKey] operation results. # - def create_or_update_host_name_binding_slot(resource_group_name, name, host_name, host_name_binding, slot, custom_headers = nil) - response = create_or_update_host_name_binding_slot_async(resource_group_name, name, host_name, host_name_binding, slot, custom_headers).value! + def list_hybrid_connection_keys_slot(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) + response = list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! response.body unless response.nil? end # - # Creates a hostname binding for an app. + # Gets the send key name and value for a Hybrid Connection. # - # Creates a hostname binding for an app. + # Gets the send key name and value for a Hybrid Connection. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. - # @param host_name_binding [HostNameBinding] Binding details. This is the JSON - # representation of a HostNameBinding object. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create a binding for the production slot. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection + # @param slot [String] The name of the slot for the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_host_name_binding_slot_with_http_info(resource_group_name, name, host_name, host_name_binding, slot, custom_headers = nil) - create_or_update_host_name_binding_slot_async(resource_group_name, name, host_name, host_name_binding, slot, custom_headers).value! + def list_hybrid_connection_keys_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) + list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! end # - # Creates a hostname binding for an app. + # Gets the send key name and value for a Hybrid Connection. # - # Creates a hostname binding for an app. + # Gets the send key name and value for a Hybrid Connection. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param host_name [String] Hostname in the hostname binding. - # @param host_name_binding [HostNameBinding] Binding details. This is the JSON - # representation of a HostNameBinding object. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create a binding for the production slot. + # @param name [String] The name of the web app + # @param namespace_name [String] The namespace for this hybrid connection + # @param relay_name [String] The relay name for this hybrid connection + # @param slot [String] The name of the slot for the web app. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_host_name_binding_slot_async(resource_group_name, name, host_name, host_name_binding, slot, custom_headers = nil) + def list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'host_name is nil' if host_name.nil? - fail ArgumentError, 'host_name_binding is nil' if host_name_binding.nil? + fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? + fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -14616,27 +16620,18 @@ def create_or_update_host_name_binding_slot_async(resource_group_name, name, hos # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() - request_content = @client.serialize(request_mapper, host_name_binding) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'hostName' => host_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:put, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -14652,7 +16647,7 @@ def create_or_update_host_name_binding_slot_async(resource_group_name, name, hos if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HostNameBinding.mapper() + result_mapper = Azure::ARM::Web::Models::HybridConnectionKey.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -14666,66 +16661,60 @@ def create_or_update_host_name_binding_slot_async(resource_group_name, name, hos end # - # Deletes a hostname binding for an app. + # Retrieves all Service Bus Hybrid Connections used by this Web App. # - # Deletes a hostname binding for an app. + # Retrieves all Service Bus Hybrid Connections used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. - # @param host_name [String] Hostname in the hostname binding. + # @param name [String] The name of the web app + # @param slot [String] The name of the slot for the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [HybridConnection] operation results. # - def delete_host_name_binding_slot(resource_group_name, name, slot, host_name, custom_headers = nil) - response = delete_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! - nil + def list_hybrid_connections_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? end # - # Deletes a hostname binding for an app. + # Retrieves all Service Bus Hybrid Connections used by this Web App. # - # Deletes a hostname binding for an app. + # Retrieves all Service Bus Hybrid Connections used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. - # @param host_name [String] Hostname in the hostname binding. + # @param name [String] The name of the web app + # @param slot [String] The name of the slot for the web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_host_name_binding_slot_with_http_info(resource_group_name, name, slot, host_name, custom_headers = nil) - delete_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers).value! + def list_hybrid_connections_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Deletes a hostname binding for an app. + # Retrieves all Service Bus Hybrid Connections used by this Web App. # - # Deletes a hostname binding for an app. + # Retrieves all Service Bus Hybrid Connections used by this Web App. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the binding for the production slot. - # @param host_name [String] Hostname in the hostname binding. + # @param name [String] The name of the web app + # @param slot [String] The name of the slot for the web app. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_host_name_binding_slot_async(resource_group_name, name, slot, host_name, custom_headers = nil) + def list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? - fail ArgumentError, 'host_name is nil' if host_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -14735,29 +16724,39 @@ def delete_host_name_binding_slot_async(resource_group_name, name, slot, host_na # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'hostName' => host_name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -14766,67 +16765,68 @@ def delete_host_name_binding_slot_async(resource_group_name, name, slot, host_na end # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get hybrid connections for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HybridConnection] operation results. + # @return [RelayServiceConnectionEntity] operation results. # - def get_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) - response = get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! + def list_relay_service_connections_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_relay_service_connections_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get hybrid connections for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) - get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! + def list_relay_service_connections_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_relay_service_connections_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # - # Retrieves a specific Service Bus Hybrid Connection used by this Web App. + # Gets hybrid connections configured for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get hybrid connections for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) + def list_relay_service_connections_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, 'relay_name is nil' if relay_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -14837,13 +16837,13 @@ def get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -14864,7 +16864,7 @@ def get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -14878,74 +16878,66 @@ def get_hybrid_connection_slot_async(resource_group_name, name, namespace_name, end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Gets a hybrid connection configuration by its name. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Gets a hybrid connection configuration by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get a hybrid connection for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HybridConnection] operation results. + # @return [RelayServiceConnectionEntity] operation results. # - def create_or_update_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) - response = create_or_update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers).value! + def get_relay_service_connection_slot(resource_group_name, name, entity_name, slot, custom_headers = nil) + response = get_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers).value! response.body unless response.nil? end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Gets a hybrid connection configuration by its name. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Gets a hybrid connection configuration by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get a hybrid connection for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) - create_or_update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers).value! + def get_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, slot, custom_headers = nil) + get_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers).value! end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Gets a hybrid connection configuration by its name. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Gets a hybrid connection configuration by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get a hybrid connection for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) + def get_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, 'relay_name is nil' if relay_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'entity_name is nil' if entity_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -14956,27 +16948,18 @@ def create_or_update_hybrid_connection_slot_async(resource_group_name, name, nam # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:put, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -14992,7 +16975,7 @@ def create_or_update_hybrid_connection_slot_async(resource_group_name, name, nam if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -15006,66 +16989,79 @@ def create_or_update_hybrid_connection_slot_async(resource_group_name, name, nam end # - # Removes a Hybrid Connection from this site. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Removes a Hybrid Connection from this site. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will create or update a hybrid connection for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [RelayServiceConnectionEntity] operation results. # - def delete_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) - response = delete_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! - nil + def create_or_update_relay_service_connection_slot(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) + response = create_or_update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers).value! + response.body unless response.nil? end # - # Removes a Hybrid Connection from this site. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Removes a Hybrid Connection from this site. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will create or update a hybrid connection for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) - delete_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! + def create_or_update_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) + create_or_update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers).value! end # - # Removes a Hybrid Connection from this site. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Removes a Hybrid Connection from this site. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will create or update a hybrid connection for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) + def create_or_update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, 'relay_name is nil' if relay_name.nil? + fail ArgumentError, 'entity_name is nil' if entity_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -15076,29 +17072,48 @@ def delete_hybrid_connection_slot_async(resource_group_name, name, namespace_nam # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 404 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -15107,74 +17122,65 @@ def delete_hybrid_connection_slot_async(resource_group_name, name, namespace_nam end # - # Creates a new Hybrid Connection using a Service Bus relay. - # - # Creates a new Hybrid Connection using a Service Bus relay. + # Deletes a relay service connection by its name. # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection - # @param slot [String] The name of the slot for the web app. + # Deletes a relay service connection by its name. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete a hybrid connection for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HybridConnection] operation results. # - def update_hybrid_connection_slot(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) - response = update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers).value! - response.body unless response.nil? + def delete_relay_service_connection_slot(resource_group_name, name, entity_name, slot, custom_headers = nil) + response = delete_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers).value! + nil end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Deletes a relay service connection by its name. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Deletes a relay service connection by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete a hybrid connection for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_hybrid_connection_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) - update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers).value! + def delete_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, slot, custom_headers = nil) + delete_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers).value! end # - # Creates a new Hybrid Connection using a Service Bus relay. + # Deletes a relay service connection by its name. # - # Creates a new Hybrid Connection using a Service Bus relay. + # Deletes a relay service connection by its name. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param connection_envelope [HybridConnection] The details of the hybrid - # connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete a hybrid connection for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_hybrid_connection_slot_async(resource_group_name, name, namespace_name, relay_name, connection_envelope, slot, custom_headers = nil) + def delete_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, 'relay_name is nil' if relay_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'entity_name is nil' if entity_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -15185,48 +17191,29 @@ def update_hybrid_connection_slot_async(resource_group_name, name, namespace_nam # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:patch, path_template, options) + promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -15235,67 +17222,79 @@ def update_hybrid_connection_slot_async(resource_group_name, name, namespace_nam end # - # Gets the send key name and value for a Hybrid Connection. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Gets the send key name and value for a Hybrid Connection. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will create or update a hybrid connection for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HybridConnectionKey] operation results. + # @return [RelayServiceConnectionEntity] operation results. # - def list_hybrid_connection_keys_slot(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) - response = list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! + def update_relay_service_connection_slot(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) + response = update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers).value! response.body unless response.nil? end # - # Gets the send key name and value for a Hybrid Connection. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Gets the send key name and value for a Hybrid Connection. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will create or update a hybrid connection for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_hybrid_connection_keys_slot_with_http_info(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) - list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers).value! + def update_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) + update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers).value! end # - # Gets the send key name and value for a Hybrid Connection. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # - # Gets the send key name and value for a Hybrid Connection. + # Creates a new hybrid connection configuration (PUT), or updates an existing + # one (PATCH). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param namespace_name [String] The namespace for this hybrid connection - # @param relay_name [String] The relay name for this hybrid connection - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param entity_name [String] Name of the hybrid connection configuration. + # @param connection_envelope [RelayServiceConnectionEntity] Details of the + # hybrid connection configuration. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will create or update a hybrid connection for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_name, relay_name, slot, custom_headers = nil) + def update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'namespace_name is nil' if namespace_name.nil? - fail ArgumentError, 'relay_name is nil' if relay_name.nil? + fail ArgumentError, 'entity_name is nil' if entity_name.nil? + fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -15306,18 +17305,27 @@ def list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_ # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + request_content = @client.serialize(request_mapper, connection_envelope) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'namespaceName' => namespace_name,'relayName' => relay_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response @@ -15333,7 +17341,7 @@ def list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_ if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HybridConnectionKey.mapper() + result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -15347,57 +17355,60 @@ def list_hybrid_connection_keys_slot_async(resource_group_name, name, namespace_ end # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Gets all scale-out instances of an app. # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Gets all scale-out instances of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API gets the production slot instances. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [HybridConnection] operation results. + # @return [Array] operation results. # - def list_hybrid_connections_slot(resource_group_name, name, slot, custom_headers = nil) - response = list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_headers).value! - response.body unless response.nil? + def list_instance_identifiers_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_instance_identifiers_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items end # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Gets all scale-out instances of an app. # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Gets all scale-out instances of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API gets the production slot instances. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_hybrid_connections_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_instance_identifiers_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_instance_identifiers_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Gets all scale-out instances of an app. # - # Retrieves all Service Bus Hybrid Connections used by this Web App. + # Gets all scale-out instances of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app - # @param slot [String] The name of the slot for the web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API gets the production slot instances. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_instance_identifiers_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -15410,7 +17421,7 @@ def list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_h # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances' request_url = @base_url || @client.base_url @@ -15437,7 +17448,7 @@ def list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_h if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::HybridConnection.mapper() + result_mapper = Azure::ARM::Web::Models::WebAppInstanceCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -15451,69 +17462,79 @@ def list_hybrid_connections_slot_async(resource_group_name, name, slot, custom_h end # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # List deployments for an app, or a deployment slot, or for an instance of a + # scaled-out app. # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # List deployments for an app, or a deployment slot, or for an instance of a + # scaled-out app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get hybrid connections for the production slot. + # the API returns deployments for the production slot. + # @param instance_id [String] The ID of a specific scaled-out instance. This is + # the value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RelayServiceConnectionEntity] operation results. + # @return [Array] operation results. # - def list_relay_service_connections_slot(resource_group_name, name, slot, custom_headers = nil) - response = list_relay_service_connections_slot_async(resource_group_name, name, slot, custom_headers).value! - response.body unless response.nil? + def list_instance_deployments_slot(resource_group_name, name, slot, instance_id, custom_headers = nil) + first_page = list_instance_deployments_slot_as_lazy(resource_group_name, name, slot, instance_id, custom_headers) + first_page.get_all_items end # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # List deployments for an app, or a deployment slot, or for an instance of a + # scaled-out app. # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # List deployments for an app, or a deployment slot, or for an instance of a + # scaled-out app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get hybrid connections for the production slot. + # the API returns deployments for the production slot. + # @param instance_id [String] The ID of a specific scaled-out instance. This is + # the value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_relay_service_connections_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_relay_service_connections_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_instance_deployments_slot_with_http_info(resource_group_name, name, slot, instance_id, custom_headers = nil) + list_instance_deployments_slot_async(resource_group_name, name, slot, instance_id, custom_headers).value! end # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # List deployments for an app, or a deployment slot, or for an instance of a + # scaled-out app. # - # Gets hybrid connections configured for an app (or deployment slot, if - # specified). + # List deployments for an app, or a deployment slot, or for an instance of a + # scaled-out app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get hybrid connections for the production slot. + # the API returns deployments for the production slot. + # @param instance_id [String] The ID of a specific scaled-out instance. This is + # the value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_relay_service_connections_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_instance_deployments_slot_async(resource_group_name, name, slot, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -15523,13 +17544,13 @@ def list_relay_service_connections_slot_async(resource_group_name, name, slot, c # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -15550,7 +17571,7 @@ def list_relay_service_connections_slot_async(resource_group_name, name, slot, c if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + result_mapper = Azure::ARM::Web::Models::DeploymentCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -15564,67 +17585,83 @@ def list_relay_service_connections_slot_async(resource_group_name, name, slot, c end # - # Gets a hybrid connection configuration by its name. + # Get a deployment by its ID for an app, a specific deployment slot, and/or a + # specific scaled-out instance. # - # Gets a hybrid connection configuration by its name. + # Get a deployment by its ID for an app, a specific deployment slot, and/or a + # specific scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection. + # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get a hybrid connection for the production slot. + # the API gets a deployment for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RelayServiceConnectionEntity] operation results. + # @return [Deployment] operation results. # - def get_relay_service_connection_slot(resource_group_name, name, entity_name, slot, custom_headers = nil) - response = get_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers).value! + def get_instance_deployment_slot(resource_group_name, name, id, slot, instance_id, custom_headers = nil) + response = get_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, custom_headers).value! response.body unless response.nil? end # - # Gets a hybrid connection configuration by its name. + # Get a deployment by its ID for an app, a specific deployment slot, and/or a + # specific scaled-out instance. # - # Gets a hybrid connection configuration by its name. + # Get a deployment by its ID for an app, a specific deployment slot, and/or a + # specific scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection. + # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get a hybrid connection for the production slot. + # the API gets a deployment for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, slot, custom_headers = nil) - get_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers).value! + def get_instance_deployment_slot_with_http_info(resource_group_name, name, id, slot, instance_id, custom_headers = nil) + get_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, custom_headers).value! end # - # Gets a hybrid connection configuration by its name. + # Get a deployment by its ID for an app, a specific deployment slot, and/or a + # specific scaled-out instance. # - # Gets a hybrid connection configuration by its name. + # Get a deployment by its ID for an app, a specific deployment slot, and/or a + # specific scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection. + # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get a hybrid connection for the production slot. + # the API gets a deployment for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers = nil) + def get_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'entity_name is nil' if entity_name.nil? + fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -15634,13 +17671,13 @@ def get_relay_service_connection_slot_async(resource_group_name, name, entity_na # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -15661,7 +17698,7 @@ def get_relay_service_connection_slot_async(resource_group_name, name, entity_na if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + result_mapper = Azure::ARM::Web::Models::Deployment.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -15675,80 +17712,87 @@ def get_relay_service_connection_slot_async(resource_group_name, name, entity_na end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Create a deployment for an app, a specific deployment slot, and/or a specific + # scaled-out instance. # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Create a deployment for an app, a specific deployment slot, and/or a specific + # scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. + # @param id [String] ID of an existing deployment. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create or update a hybrid connection for the production slot. + # the API creates a deployment for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" + # @param deployment [Deployment] Deployment details. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RelayServiceConnectionEntity] operation results. + # @return [Deployment] operation results. # - def create_or_update_relay_service_connection_slot(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) - response = create_or_update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers).value! + def create_instance_deployment_slot(resource_group_name, name, id, slot, instance_id, deployment, custom_headers = nil) + response = create_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, deployment, custom_headers).value! response.body unless response.nil? end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Create a deployment for an app, a specific deployment slot, and/or a specific + # scaled-out instance. # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Create a deployment for an app, a specific deployment slot, and/or a specific + # scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. + # @param id [String] ID of an existing deployment. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create or update a hybrid connection for the production slot. + # the API creates a deployment for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" + # @param deployment [Deployment] Deployment details. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_or_update_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) - create_or_update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers).value! + def create_instance_deployment_slot_with_http_info(resource_group_name, name, id, slot, instance_id, deployment, custom_headers = nil) + create_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, deployment, custom_headers).value! end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Create a deployment for an app, a specific deployment slot, and/or a specific + # scaled-out instance. # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Create a deployment for an app, a specific deployment slot, and/or a specific + # scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. + # @param id [String] ID of an existing deployment. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create or update a hybrid connection for the production slot. + # the API creates a deployment for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" + # @param deployment [Deployment] Deployment details. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_or_update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) + def create_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, deployment, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'entity_name is nil' if entity_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? + fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? + fail ArgumentError, 'deployment is nil' if deployment.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -15762,17 +17806,17 @@ def create_or_update_relay_service_connection_slot_async(resource_group_name, na request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) + request_mapper = Azure::ARM::Web::Models::Deployment.mapper() + request_content = @client.serialize(request_mapper, deployment) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), @@ -15794,7 +17838,7 @@ def create_or_update_relay_service_connection_slot_async(resource_group_name, na if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + result_mapper = Azure::ARM::Web::Models::Deployment.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -15808,66 +17852,82 @@ def create_or_update_relay_service_connection_slot_async(resource_group_name, na end # - # Deletes a relay service connection by its name. + # Delete a deployment by its ID for an app, a specific deployment slot, and/or + # a specific scaled-out instance. # - # Deletes a relay service connection by its name. + # Delete a deployment by its ID for an app, a specific deployment slot, and/or + # a specific scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. + # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete a hybrid connection for the production slot. + # the API deletes a deployment for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # - def delete_relay_service_connection_slot(resource_group_name, name, entity_name, slot, custom_headers = nil) - response = delete_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers).value! + def delete_instance_deployment_slot(resource_group_name, name, id, slot, instance_id, custom_headers = nil) + response = delete_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, custom_headers).value! nil end # - # Deletes a relay service connection by its name. + # Delete a deployment by its ID for an app, a specific deployment slot, and/or + # a specific scaled-out instance. # - # Deletes a relay service connection by its name. + # Delete a deployment by its ID for an app, a specific deployment slot, and/or + # a specific scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. + # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete a hybrid connection for the production slot. + # the API deletes a deployment for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, slot, custom_headers = nil) - delete_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers).value! + def delete_instance_deployment_slot_with_http_info(resource_group_name, name, id, slot, instance_id, custom_headers = nil) + delete_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, custom_headers).value! end # - # Deletes a relay service connection by its name. + # Delete a deployment by its ID for an app, a specific deployment slot, and/or + # a specific scaled-out instance. # - # Deletes a relay service connection by its name. + # Delete a deployment by its ID for an app, a specific deployment slot, and/or + # a specific scaled-out instance. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. + # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete a hybrid connection for the production slot. + # the API deletes a deployment for the production slot. + # @param instance_id [String] ID of a specific scaled-out instance. This is the + # value of the name property in the JSON response from "GET + # api/sites/{siteName}/instances" # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_relay_service_connection_slot_async(resource_group_name, name, entity_name, slot, custom_headers = nil) + def delete_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'entity_name is nil' if entity_name.nil? + fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -15877,13 +17937,13 @@ def delete_relay_service_connection_slot_async(resource_group_name, name, entity # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -15894,7 +17954,7 @@ def delete_relay_service_connection_slot_async(resource_group_name, name, entity http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 404 + unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -15908,80 +17968,67 @@ def delete_relay_service_connection_slot_async(resource_group_name, name, entity end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Invoke the MSDeploy web app extension as pass-through API # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Invoke the MSDeploy web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create or update a hybrid connection for the production slot. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] Id of web app instance # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [RelayServiceConnectionEntity] operation results. + # @return [MSDeployStatus] operation results. # - def update_relay_service_connection_slot(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) - response = update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers).value! + def get_instance_ms_deploy_status_slot(resource_group_name, name, slot, instance_id, custom_headers = nil) + response = get_instance_ms_deploy_status_slot_async(resource_group_name, name, slot, instance_id, custom_headers).value! response.body unless response.nil? end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Invoke the MSDeploy web app extension as pass-through API # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Invoke the MSDeploy web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create or update a hybrid connection for the production slot. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] Id of web app instance # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def update_relay_service_connection_slot_with_http_info(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) - update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers).value! + def get_instance_ms_deploy_status_slot_with_http_info(resource_group_name, name, slot, instance_id, custom_headers = nil) + get_instance_ms_deploy_status_slot_async(resource_group_name, name, slot, instance_id, custom_headers).value! end # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Invoke the MSDeploy web app extension as pass-through API # - # Creates a new hybrid connection configuration (PUT), or updates an existing - # one (PATCH). + # Invoke the MSDeploy web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param entity_name [String] Name of the hybrid connection configuration. - # @param connection_envelope [RelayServiceConnectionEntity] Details of the - # hybrid connection configuration. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will create or update a hybrid connection for the production slot. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] Id of web app instance # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def update_relay_service_connection_slot_async(resource_group_name, name, entity_name, connection_envelope, slot, custom_headers = nil) + def get_instance_ms_deploy_status_slot_async(resource_group_name, name, slot, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'entity_name is nil' if entity_name.nil? - fail ArgumentError, 'connection_envelope is nil' if connection_envelope.nil? fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -15991,27 +18038,18 @@ def update_relay_service_connection_slot_async(resource_group_name, name, entity # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() - request_content = @client.serialize(request_mapper, connection_envelope) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'entityName' => entity_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:patch, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -16027,7 +18065,7 @@ def update_relay_service_connection_slot_async(resource_group_name, name, entity if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RelayServiceConnectionEntity.mapper() + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -16041,63 +18079,121 @@ def update_relay_service_connection_slot_async(resource_group_name, name, entity end # - # Gets all scale-out instances of an app. + # Invoke the MSDeploy web app extension as pass-through API # - # Gets all scale-out instances of an app. + # Invoke the MSDeploy web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets the production slot instances. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] Id of web app instance + # @param msdeploy [MSDeploy] Details of MSDeploy operation # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [MSDeployStatus] operation results. # - def list_instance_identifiers_slot(resource_group_name, name, slot, custom_headers = nil) - first_page = list_instance_identifiers_slot_as_lazy(resource_group_name, name, slot, custom_headers) - first_page.get_all_items + def create_instance_msdeploy_operation_slot(resource_group_name, name, slot, instance_id, msdeploy, custom_headers = nil) + response = create_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers).value! + response.body unless response.nil? end # - # Gets all scale-out instances of an app. + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] Id of web app instance + # @param msdeploy [MSDeploy] Details of MSDeploy operation + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. # - # Gets all scale-out instances of an app. + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers = nil) + # Send request + promise = begin_create_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Invoke the MSDeploy Log web app extension as pass-through API + # + # Invoke the MSDeploy Log web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets the production slot instances. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] Id of web app instance + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MSDeployLog] operation results. + # + def get_instance_msdeploy_log_slot(resource_group_name, name, slot, instance_id, custom_headers = nil) + response = get_instance_msdeploy_log_slot_async(resource_group_name, name, slot, instance_id, custom_headers).value! + response.body unless response.nil? + end + + # + # Invoke the MSDeploy Log web app extension as pass-through API + # + # Invoke the MSDeploy Log web app extension as pass-through API + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] Id of web app instance # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_instance_identifiers_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_instance_identifiers_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_instance_msdeploy_log_slot_with_http_info(resource_group_name, name, slot, instance_id, custom_headers = nil) + get_instance_msdeploy_log_slot_async(resource_group_name, name, slot, instance_id, custom_headers).value! end # - # Gets all scale-out instances of an app. + # Invoke the MSDeploy Log web app extension as pass-through API # - # Gets all scale-out instances of an app. + # Invoke the MSDeploy Log web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets the production slot instances. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] Id of web app instance # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_instance_identifiers_slot_async(resource_group_name, name, slot, custom_headers = nil) + def get_instance_msdeploy_log_slot_async(resource_group_name, name, slot, instance_id, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -16107,13 +18203,13 @@ def list_instance_identifiers_slot_async(resource_group_name, name, slot, custom # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -16134,7 +18230,7 @@ def list_instance_identifiers_slot_async(resource_group_name, name, slot, custom if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::WebAppInstanceCollection.mapper() + result_mapper = Azure::ARM::Web::Models::MSDeployLog.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -16148,79 +18244,63 @@ def list_instance_identifiers_slot_async(resource_group_name, name, slot, custom end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Shows whether an app can be cloned to another resource group or subscription. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Shows whether an app can be cloned to another resource group or subscription. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API returns deployments for the production slot. - # @param instance_id [String] The ID of a specific scaled-out instance. This is - # the value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param slot [String] Name of the deployment slot. By default, this API + # returns information on the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [SiteCloneability] operation results. # - def list_instance_deployments_slot(resource_group_name, name, slot, instance_id, custom_headers = nil) - first_page = list_instance_deployments_slot_as_lazy(resource_group_name, name, slot, instance_id, custom_headers) - first_page.get_all_items + def is_cloneable_slot(resource_group_name, name, slot, custom_headers = nil) + response = is_cloneable_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Shows whether an app can be cloned to another resource group or subscription. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Shows whether an app can be cloned to another resource group or subscription. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API returns deployments for the production slot. - # @param instance_id [String] The ID of a specific scaled-out instance. This is - # the value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param slot [String] Name of the deployment slot. By default, this API + # returns information on the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_instance_deployments_slot_with_http_info(resource_group_name, name, slot, instance_id, custom_headers = nil) - list_instance_deployments_slot_async(resource_group_name, name, slot, instance_id, custom_headers).value! + def is_cloneable_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + is_cloneable_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Shows whether an app can be cloned to another resource group or subscription. # - # List deployments for an app, or a deployment slot, or for an instance of a - # scaled-out app. + # Shows whether an app can be cloned to another resource group or subscription. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API returns deployments for the production slot. - # @param instance_id [String] The ID of a specific scaled-out instance. This is - # the value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param slot [String] Name of the deployment slot. By default, this API + # returns information on the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_instance_deployments_slot_async(resource_group_name, name, slot, instance_id, custom_headers = nil) + def is_cloneable_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? - fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -16230,18 +18310,18 @@ def list_instance_deployments_slot_async(resource_group_name, name, slot, instan # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -16257,7 +18337,7 @@ def list_instance_deployments_slot_async(resource_group_name, name, slot, instan if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::DeploymentCollection.mapper() + result_mapper = Azure::ARM::Web::Models::SiteCloneability.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -16271,83 +18351,63 @@ def list_instance_deployments_slot_async(resource_group_name, name, slot, instan end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets all metric definitions of an app (or deployment slot, if specified). # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets all metric definitions of an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets a deployment for the production slot. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # the API will get metric definitions of the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Deployment] operation results. + # @return [Array] operation results. # - def get_instance_deployment_slot(resource_group_name, name, id, slot, instance_id, custom_headers = nil) - response = get_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, custom_headers).value! - response.body unless response.nil? + def list_metric_definitions_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_metric_definitions_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets all metric definitions of an app (or deployment slot, if specified). # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets all metric definitions of an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets a deployment for the production slot. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # the API will get metric definitions of the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_instance_deployment_slot_with_http_info(resource_group_name, name, id, slot, instance_id, custom_headers = nil) - get_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, custom_headers).value! + def list_metric_definitions_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_metric_definitions_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets all metric definitions of an app (or deployment slot, if specified). # - # Get a deployment by its ID for an app, a specific deployment slot, and/or a - # specific scaled-out instance. + # Gets all metric definitions of an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] Deployment ID. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API gets a deployment for the production slot. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # the API will get metric definitions of the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, custom_headers = nil) + def list_metric_definitions_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? - fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -16357,13 +18417,13 @@ def get_instance_deployment_slot_async(resource_group_name, name, id, slot, inst # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -16384,7 +18444,7 @@ def get_instance_deployment_slot_async(resource_group_name, name, id, slot, inst if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Deployment.mapper() + result_mapper = Azure::ARM::Web::Models::ResourceMetricDefinitionCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -16398,87 +18458,81 @@ def get_instance_deployment_slot_async(resource_group_name, name, id, slot, inst end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Gets performance metrics of an app (or deployment slot, if specified). # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Gets performance metrics of an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API creates a deployment for the production slot. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" - # @param deployment [Deployment] Deployment details. + # the API will get metrics of the production slot. + # @param details [Boolean] Specify "true" to include metric details in the + # response. It is "false" by default. + # @param filter [String] Return only metrics specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Deployment] operation results. + # @return [Array] operation results. # - def create_instance_deployment_slot(resource_group_name, name, id, slot, instance_id, deployment, custom_headers = nil) - response = create_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, deployment, custom_headers).value! - response.body unless response.nil? + def list_metrics_slot(resource_group_name, name, slot, details = nil, filter = nil, custom_headers = nil) + first_page = list_metrics_slot_as_lazy(resource_group_name, name, slot, details, filter, custom_headers) + first_page.get_all_items end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Gets performance metrics of an app (or deployment slot, if specified). # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Gets performance metrics of an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API creates a deployment for the production slot. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" - # @param deployment [Deployment] Deployment details. + # the API will get metrics of the production slot. + # @param details [Boolean] Specify "true" to include metric details in the + # response. It is "false" by default. + # @param filter [String] Return only metrics specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def create_instance_deployment_slot_with_http_info(resource_group_name, name, id, slot, instance_id, deployment, custom_headers = nil) - create_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, deployment, custom_headers).value! + def list_metrics_slot_with_http_info(resource_group_name, name, slot, details = nil, filter = nil, custom_headers = nil) + list_metrics_slot_async(resource_group_name, name, slot, details, filter, custom_headers).value! end # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Gets performance metrics of an app (or deployment slot, if specified). # - # Create a deployment for an app, a specific deployment slot, and/or a specific - # scaled-out instance. + # Gets performance metrics of an app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param id [String] ID of an existing deployment. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API creates a deployment for the production slot. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" - # @param deployment [Deployment] Deployment details. + # the API will get metrics of the production slot. + # @param details [Boolean] Specify "true" to include metric details in the + # response. It is "false" by default. + # @param filter [String] Return only metrics specified in the filter (using + # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq + # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq + # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def create_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, deployment, custom_headers = nil) + def list_metrics_slot_async(resource_group_name, name, slot, details = nil, filter = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? - fail ArgumentError, 'instance_id is nil' if instance_id.nil? - fail ArgumentError, 'deployment is nil' if deployment.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -16488,27 +18542,19 @@ def create_instance_deployment_slot_async(resource_group_name, name, id, slot, i # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - - request_headers['Content-Type'] = 'application/json; charset=utf-8' - - # Serialize Request - request_mapper = Azure::ARM::Web::Models::Deployment.mapper() - request_content = @client.serialize(request_mapper, deployment) - request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, - body: request_content, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'details' => details,'api-version' => api_version}, + skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:put, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -16524,7 +18570,7 @@ def create_instance_deployment_slot_async(resource_group_name, name, id, slot, i if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::Deployment.mapper() + result_mapper = Azure::ARM::Web::Models::ResourceMetricCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -16538,82 +18584,66 @@ def create_instance_deployment_slot_async(resource_group_name, name, id, slot, i end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API deletes a deployment for the production slot. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param name [String] Name of web app + # @param slot [String] Name of the deployment slot # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [MigrateMySqlStatus] operation results. # - def delete_instance_deployment_slot(resource_group_name, name, id, slot, instance_id, custom_headers = nil) - response = delete_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, custom_headers).value! - nil + def get_migrate_my_sql_status_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API deletes a deployment for the production slot. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param name [String] Name of web app + # @param slot [String] Name of the deployment slot # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_instance_deployment_slot_with_http_info(resource_group_name, name, id, slot, instance_id, custom_headers = nil) - delete_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, custom_headers).value! + def get_migrate_my_sql_status_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled # - # Delete a deployment by its ID for an app, a specific deployment slot, and/or - # a specific scaled-out instance. + # Returns the status of MySql in app migration, if one is active, and whether + # or not MySql in app is enabled # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param id [String] Deployment ID. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API deletes a deployment for the production slot. - # @param instance_id [String] ID of a specific scaled-out instance. This is the - # value of the name property in the JSON response from "GET - # api/sites/{siteName}/instances" + # @param name [String] Name of web app + # @param slot [String] Name of the deployment slot # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_instance_deployment_slot_async(resource_group_name, name, id, slot, instance_id, custom_headers = nil) + def get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'id is nil' if id.nil? fail ArgumentError, 'slot is nil' if slot.nil? - fail ArgumentError, 'instance_id is nil' if instance_id.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -16623,29 +18653,39 @@ def delete_instance_deployment_slot_async(resource_group_name, name, id, slot, i # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'id' => id,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:delete, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::MigrateMySqlStatus.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -16654,62 +18694,69 @@ def delete_instance_deployment_slot_async(resource_group_name, name, id, slot, i end # - # Shows whether an app can be cloned to another resource group or subscription. + # Gets all network features used by the app (or deployment slot, if specified). # - # Shows whether an app can be cloned to another resource group or subscription. + # Gets all network features used by the app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. By default, this API - # returns information on the production slot. + # @param view [String] The type of view. This can either be "summary" or + # "detailed". + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get network features for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SiteCloneability] operation results. + # @return [NetworkFeatures] operation results. # - def is_cloneable_slot(resource_group_name, name, slot, custom_headers = nil) - response = is_cloneable_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_network_features_slot(resource_group_name, name, view, slot, custom_headers = nil) + response = list_network_features_slot_async(resource_group_name, name, view, slot, custom_headers).value! response.body unless response.nil? end # - # Shows whether an app can be cloned to another resource group or subscription. + # Gets all network features used by the app (or deployment slot, if specified). # - # Shows whether an app can be cloned to another resource group or subscription. + # Gets all network features used by the app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. By default, this API - # returns information on the production slot. + # @param view [String] The type of view. This can either be "summary" or + # "detailed". + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get network features for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def is_cloneable_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - is_cloneable_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_network_features_slot_with_http_info(resource_group_name, name, view, slot, custom_headers = nil) + list_network_features_slot_async(resource_group_name, name, view, slot, custom_headers).value! end # - # Shows whether an app can be cloned to another resource group or subscription. + # Gets all network features used by the app (or deployment slot, if specified). # - # Shows whether an app can be cloned to another resource group or subscription. + # Gets all network features used by the app (or deployment slot, if specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. By default, this API - # returns information on the production slot. + # @param view [String] The type of view. This can either be "summary" or + # "detailed". + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get network features for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def is_cloneable_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_network_features_slot_async(resource_group_name, name, view, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'view is nil' if view.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -16720,24 +18767,24 @@ def is_cloneable_slot_async(resource_group_name, name, slot, custom_headers = ni # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'view' => view,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -16747,7 +18794,7 @@ def is_cloneable_slot_async(resource_group_name, name, slot, custom_headers = ni if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SiteCloneability.mapper() + result_mapper = Azure::ARM::Web::Models::NetworkFeatures.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -16761,60 +18808,72 @@ def is_cloneable_slot_async(resource_group_name, name, slot, custom_headers = ni end # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Start capturing network packets for the site. # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Start capturing network packets for the site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get metric definitions of the production slot. + # @param name [String] The name of the web app. + # @param slot [String] The name of the slot for this web app. + # @param duration_in_seconds [Integer] The duration to keep capturing in + # seconds. + # @param max_frame_length [Integer] The maximum frame length in bytes + # (Optional). + # @param sas_url [String] The Blob URL to store capture file. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [String] operation results. # - def list_metric_definitions_slot(resource_group_name, name, slot, custom_headers = nil) - first_page = list_metric_definitions_slot_as_lazy(resource_group_name, name, slot, custom_headers) - first_page.get_all_items + def start_web_site_network_trace_slot(resource_group_name, name, slot, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) + response = start_web_site_network_trace_slot_async(resource_group_name, name, slot, duration_in_seconds, max_frame_length, sas_url, custom_headers).value! + response.body unless response.nil? end # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Start capturing network packets for the site. # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Start capturing network packets for the site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get metric definitions of the production slot. + # @param name [String] The name of the web app. + # @param slot [String] The name of the slot for this web app. + # @param duration_in_seconds [Integer] The duration to keep capturing in + # seconds. + # @param max_frame_length [Integer] The maximum frame length in bytes + # (Optional). + # @param sas_url [String] The Blob URL to store capture file. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_metric_definitions_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_metric_definitions_slot_async(resource_group_name, name, slot, custom_headers).value! + def start_web_site_network_trace_slot_with_http_info(resource_group_name, name, slot, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) + start_web_site_network_trace_slot_async(resource_group_name, name, slot, duration_in_seconds, max_frame_length, sas_url, custom_headers).value! end # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Start capturing network packets for the site. # - # Gets all metric definitions of an app (or deployment slot, if specified). + # Start capturing network packets for the site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get metric definitions of the production slot. + # @param name [String] The name of the web app. + # @param slot [String] The name of the slot for this web app. + # @param duration_in_seconds [Integer] The duration to keep capturing in + # seconds. + # @param max_frame_length [Integer] The maximum frame length in bytes + # (Optional). + # @param sas_url [String] The Blob URL to store capture file. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_metric_definitions_slot_async(resource_group_name, name, slot, custom_headers = nil) + def start_web_site_network_trace_slot_async(resource_group_name, name, slot, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -16827,18 +18886,18 @@ def list_metric_definitions_slot_async(resource_group_name, name, slot, custom_h # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, + query_params: {'durationInSeconds' => duration_in_seconds,'maxFrameLength' => max_frame_length,'sasUrl' => sas_url,'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -16854,7 +18913,13 @@ def list_metric_definitions_slot_async(resource_group_name, name, slot, custom_h if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ResourceMetricDefinitionCollection.mapper() + result_mapper = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'String' + } + } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -16868,78 +18933,57 @@ def list_metric_definitions_slot_async(resource_group_name, name, slot, custom_h end # - # Gets performance metrics of an app (or deployment slot, if specified). + # Stop ongoing capturing network packets for the site. # - # Gets performance metrics of an app (or deployment slot, if specified). + # Stop ongoing capturing network packets for the site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get metrics of the production slot. - # @param details [Boolean] Specify "true" to include metric details in the - # response. It is "false" by default. - # @param filter [String] Return only metrics specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param name [String] The name of the web app. + # @param slot [String] The name of the slot for this web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [String] operation results. # - def list_metrics_slot(resource_group_name, name, slot, details = nil, filter = nil, custom_headers = nil) - first_page = list_metrics_slot_as_lazy(resource_group_name, name, slot, details, filter, custom_headers) - first_page.get_all_items + def stop_web_site_network_trace_slot(resource_group_name, name, slot, custom_headers = nil) + response = stop_web_site_network_trace_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? end # - # Gets performance metrics of an app (or deployment slot, if specified). + # Stop ongoing capturing network packets for the site. # - # Gets performance metrics of an app (or deployment slot, if specified). + # Stop ongoing capturing network packets for the site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get metrics of the production slot. - # @param details [Boolean] Specify "true" to include metric details in the - # response. It is "false" by default. - # @param filter [String] Return only metrics specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param name [String] The name of the web app. + # @param slot [String] The name of the slot for this web app. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_metrics_slot_with_http_info(resource_group_name, name, slot, details = nil, filter = nil, custom_headers = nil) - list_metrics_slot_async(resource_group_name, name, slot, details, filter, custom_headers).value! + def stop_web_site_network_trace_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + stop_web_site_network_trace_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets performance metrics of an app (or deployment slot, if specified). + # Stop ongoing capturing network packets for the site. # - # Gets performance metrics of an app (or deployment slot, if specified). + # Stop ongoing capturing network packets for the site. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get metrics of the production slot. - # @param details [Boolean] Specify "true" to include metric details in the - # response. It is "false" by default. - # @param filter [String] Return only metrics specified in the filter (using - # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq - # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq - # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + # @param name [String] The name of the web app. + # @param slot [String] The name of the slot for this web app. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_metrics_slot_async(resource_group_name, name, slot, details = nil, filter = nil, custom_headers = nil) + def stop_web_site_network_trace_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -16952,19 +18996,18 @@ def list_metrics_slot_async(resource_group_name, name, slot, details = nil, filt # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'details' => details,'api-version' => api_version}, - skip_encoding_query_params: {'$filter' => filter}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -16980,7 +19023,13 @@ def list_metrics_slot_async(resource_group_name, name, slot, details = nil, filt if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ResourceMetricCollection.mapper() + result_mapper = { + required: false, + serialized_name: 'parsed_response', + type: { + name: 'String' + } + } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -16994,63 +19043,65 @@ def list_metrics_slot_async(resource_group_name, name, slot, details = nil, filt end # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Generates a new publishing password for an app (or deployment slot, if + # specified). # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Generates a new publishing password for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of the deployment slot + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API generate a new publishing password for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [MigrateMySqlStatus] operation results. # - def get_migrate_my_sql_status_slot(resource_group_name, name, slot, custom_headers = nil) - response = get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom_headers).value! - response.body unless response.nil? + def generate_new_site_publishing_password_slot(resource_group_name, name, slot, custom_headers = nil) + response = generate_new_site_publishing_password_slot_async(resource_group_name, name, slot, custom_headers).value! + nil end # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Generates a new publishing password for an app (or deployment slot, if + # specified). # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Generates a new publishing password for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of the deployment slot + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API generate a new publishing password for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_migrate_my_sql_status_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom_headers).value! + def generate_new_site_publishing_password_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + generate_new_site_publishing_password_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Generates a new publishing password for an app (or deployment slot, if + # specified). # - # Returns the status of MySql in app migration, if one is active, and whether - # or not MySql in app is enabled + # Generates a new publishing password for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of the deployment slot + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API generate a new publishing password for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom_headers = nil) + def generate_new_site_publishing_password_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -17063,7 +19114,7 @@ def get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword' request_url = @base_url || @client.base_url @@ -17074,28 +19125,18 @@ def get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::MigrateMySqlStatus.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -17104,69 +19145,74 @@ def get_migrate_my_sql_status_slot_async(resource_group_name, name, slot, custom end # - # Gets all network features used by the app (or deployment slot, if specified). + # Gets perfmon counters for web app. # - # Gets all network features used by the app (or deployment slot, if specified). + # Gets perfmon counters for web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param view [String] The type of view. This can either be "summary" or - # "detailed". - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get network features for the production slot. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param filter [String] Return only usages/metrics specified in the filter. + # Filter conforms to odata syntax. Example: $filter=(startTime eq + # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + # duration'[Hour|Minute|Day]'. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [NetworkFeatures] operation results. + # @return [Array] operation results. # - def list_network_features_slot(resource_group_name, name, view, slot, custom_headers = nil) - response = list_network_features_slot_async(resource_group_name, name, view, slot, custom_headers).value! - response.body unless response.nil? + def list_perf_mon_counters_slot(resource_group_name, name, slot, filter = nil, custom_headers = nil) + first_page = list_perf_mon_counters_slot_as_lazy(resource_group_name, name, slot, filter, custom_headers) + first_page.get_all_items end # - # Gets all network features used by the app (or deployment slot, if specified). + # Gets perfmon counters for web app. # - # Gets all network features used by the app (or deployment slot, if specified). + # Gets perfmon counters for web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param view [String] The type of view. This can either be "summary" or - # "detailed". - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get network features for the production slot. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param filter [String] Return only usages/metrics specified in the filter. + # Filter conforms to odata syntax. Example: $filter=(startTime eq + # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + # duration'[Hour|Minute|Day]'. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_network_features_slot_with_http_info(resource_group_name, name, view, slot, custom_headers = nil) - list_network_features_slot_async(resource_group_name, name, view, slot, custom_headers).value! + def list_perf_mon_counters_slot_with_http_info(resource_group_name, name, slot, filter = nil, custom_headers = nil) + list_perf_mon_counters_slot_async(resource_group_name, name, slot, filter, custom_headers).value! end # - # Gets all network features used by the app (or deployment slot, if specified). + # Gets perfmon counters for web app. # - # Gets all network features used by the app (or deployment slot, if specified). + # Gets perfmon counters for web app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param view [String] The type of view. This can either be "summary" or - # "detailed". - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get network features for the production slot. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param filter [String] Return only usages/metrics specified in the filter. + # Filter conforms to odata syntax. Example: $filter=(startTime eq + # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + # duration'[Hour|Minute|Day]'. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_network_features_slot_async(resource_group_name, name, view, slot, custom_headers = nil) + def list_perf_mon_counters_slot_async(resource_group_name, name, slot, filter = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'view is nil' if view.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -17177,14 +19223,15 @@ def list_network_features_slot_async(resource_group_name, name, view, slot, cust # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'view' => view,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } @@ -17194,7 +19241,7 @@ def list_network_features_slot_async(resource_group_name, name, view, slot, cust http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 || status_code == 404 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -17204,7 +19251,7 @@ def list_network_features_slot_async(resource_group_name, name, view, slot, cust if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::NetworkFeatures.mapper() + result_mapper = Azure::ARM::Web::Models::PerfMonCounterCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -17218,72 +19265,60 @@ def list_network_features_slot_async(resource_group_name, name, view, slot, cust end # - # Start capturing network packets for the site. + # Gets web app's event logs. # - # Start capturing network packets for the site. + # Gets web app's event logs. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. - # @param slot [String] The name of the slot for this web app. - # @param duration_in_seconds [Integer] The duration to keep capturing in - # seconds. - # @param max_frame_length [Integer] The maximum frame length in bytes - # (Optional). - # @param sas_url [String] The Blob URL to store capture file. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [String] operation results. + # @return [SitePhpErrorLogFlag] operation results. # - def start_web_site_network_trace_slot(resource_group_name, name, slot, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) - response = start_web_site_network_trace_slot_async(resource_group_name, name, slot, duration_in_seconds, max_frame_length, sas_url, custom_headers).value! + def get_site_php_error_log_flag_slot(resource_group_name, name, slot, custom_headers = nil) + response = get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Start capturing network packets for the site. + # Gets web app's event logs. # - # Start capturing network packets for the site. + # Gets web app's event logs. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. - # @param slot [String] The name of the slot for this web app. - # @param duration_in_seconds [Integer] The duration to keep capturing in - # seconds. - # @param max_frame_length [Integer] The maximum frame length in bytes - # (Optional). - # @param sas_url [String] The Blob URL to store capture file. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def start_web_site_network_trace_slot_with_http_info(resource_group_name, name, slot, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) - start_web_site_network_trace_slot_async(resource_group_name, name, slot, duration_in_seconds, max_frame_length, sas_url, custom_headers).value! + def get_site_php_error_log_flag_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Start capturing network packets for the site. + # Gets web app's event logs. # - # Start capturing network packets for the site. + # Gets web app's event logs. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. - # @param slot [String] The name of the slot for this web app. - # @param duration_in_seconds [Integer] The duration to keep capturing in - # seconds. - # @param max_frame_length [Integer] The maximum frame length in bytes - # (Optional). - # @param sas_url [String] The Blob URL to store capture file. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def start_web_site_network_trace_slot_async(resource_group_name, name, slot, duration_in_seconds = nil, max_frame_length = nil, sas_url = nil, custom_headers = nil) + def get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -17296,18 +19331,18 @@ def start_web_site_network_trace_slot_async(resource_group_name, name, slot, dur # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'durationInSeconds' => duration_in_seconds,'maxFrameLength' => max_frame_length,'sasUrl' => sas_url,'api-version' => api_version}, + query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -17323,13 +19358,7 @@ def start_web_site_network_trace_slot_async(resource_group_name, name, slot, dur if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = { - required: false, - serialized_name: 'parsed_response', - type: { - name: 'String' - } - } + result_mapper = Azure::ARM::Web::Models::SitePhpErrorLogFlag.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -17343,57 +19372,60 @@ def start_web_site_network_trace_slot_async(resource_group_name, name, slot, dur end # - # Stop ongoing capturing network packets for the site. + # Gets the premier add-ons of an app. # - # Stop ongoing capturing network packets for the site. + # Gets the premier add-ons of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. - # @param slot [String] The name of the slot for this web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the premier add-ons for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [String] operation results. + # @return [PremierAddOn] operation results. # - def stop_web_site_network_trace_slot(resource_group_name, name, slot, custom_headers = nil) - response = stop_web_site_network_trace_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_premier_add_ons_slot(resource_group_name, name, slot, custom_headers = nil) + response = list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_headers).value! response.body unless response.nil? end # - # Stop ongoing capturing network packets for the site. + # Gets the premier add-ons of an app. # - # Stop ongoing capturing network packets for the site. + # Gets the premier add-ons of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. - # @param slot [String] The name of the slot for this web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the premier add-ons for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def stop_web_site_network_trace_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - stop_web_site_network_trace_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_premier_add_ons_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Stop ongoing capturing network packets for the site. + # Gets the premier add-ons of an app. # - # Stop ongoing capturing network packets for the site. + # Gets the premier add-ons of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] The name of the web app. - # @param slot [String] The name of the slot for this web app. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the premier add-ons for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def stop_web_site_network_trace_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -17406,7 +19438,7 @@ def stop_web_site_network_trace_slot_async(resource_group_name, name, slot, cust # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons' request_url = @base_url || @client.base_url @@ -17417,7 +19449,7 @@ def stop_web_site_network_trace_slot_async(resource_group_name, name, slot, cust headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response @@ -17433,13 +19465,7 @@ def stop_web_site_network_trace_slot_async(resource_group_name, name, slot, cust if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = { - required: false, - serialized_name: 'parsed_response', - type: { - name: 'String' - } - } + result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -17453,67 +19479,66 @@ def stop_web_site_network_trace_slot_async(resource_group_name, name, slot, cust end # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Gets a named add-on of an app. # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Gets a named add-on of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API generate a new publishing password for the production slot. + # the API will get the named add-on for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # + # @return [PremierAddOn] operation results. # - def generate_new_site_publishing_password_slot(resource_group_name, name, slot, custom_headers = nil) - response = generate_new_site_publishing_password_slot_async(resource_group_name, name, slot, custom_headers).value! - nil + def get_premier_add_on_slot(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) + response = get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers).value! + response.body unless response.nil? end # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Gets a named add-on of an app. # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Gets a named add-on of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API generate a new publishing password for the production slot. + # the API will get the named add-on for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def generate_new_site_publishing_password_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - generate_new_site_publishing_password_slot_async(resource_group_name, name, slot, custom_headers).value! + def get_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) + get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers).value! end # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Gets a named add-on of an app. # - # Generates a new publishing password for an app (or deployment slot, if - # specified). + # Gets a named add-on of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API generate a new publishing password for the production slot. + # the API will get the named add-on for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def generate_new_site_publishing_password_slot_async(resource_group_name, name, slot, custom_headers = nil) + def get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -17524,29 +19549,39 @@ def generate_new_site_publishing_password_slot_async(resource_group_name, name, # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end result end @@ -17555,74 +19590,73 @@ def generate_new_site_publishing_password_slot_async(resource_group_name, name, end # - # Gets perfmon counters for web app. + # Updates a named add-on of an app. # - # Gets perfmon counters for web app. + # Updates a named add-on of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. **** CURRENTLY UNUSED ***** - # @param filter [String] Return only usages/metrics specified in the filter. - # Filter conforms to odata syntax. Example: $filter=(startTime eq - # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq - # duration'[Hour|Minute|Day]'. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. + # @param premier_add_on [PremierAddOn] A JSON representation of the edited + # premier add-on. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the named add-on for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [PremierAddOn] operation results. # - def list_perf_mon_counters_slot(resource_group_name, name, slot, filter = nil, custom_headers = nil) - first_page = list_perf_mon_counters_slot_as_lazy(resource_group_name, name, slot, filter, custom_headers) - first_page.get_all_items + def add_premier_add_on_slot(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers = nil) + response = add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers).value! + response.body unless response.nil? end # - # Gets perfmon counters for web app. + # Updates a named add-on of an app. # - # Gets perfmon counters for web app. + # Updates a named add-on of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. **** CURRENTLY UNUSED ***** - # @param filter [String] Return only usages/metrics specified in the filter. - # Filter conforms to odata syntax. Example: $filter=(startTime eq - # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq - # duration'[Hour|Minute|Day]'. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. + # @param premier_add_on [PremierAddOn] A JSON representation of the edited + # premier add-on. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the named add-on for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_perf_mon_counters_slot_with_http_info(resource_group_name, name, slot, filter = nil, custom_headers = nil) - list_perf_mon_counters_slot_async(resource_group_name, name, slot, filter, custom_headers).value! + def add_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers = nil) + add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers).value! end # - # Gets perfmon counters for web app. + # Updates a named add-on of an app. # - # Gets perfmon counters for web app. + # Updates a named add-on of an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. **** CURRENTLY UNUSED ***** - # @param filter [String] Return only usages/metrics specified in the filter. - # Filter conforms to odata syntax. Example: $filter=(startTime eq - # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq - # duration'[Hour|Minute|Day]'. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. + # @param premier_add_on [PremierAddOn] A JSON representation of the edited + # premier add-on. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will update the named add-on for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_perf_mon_counters_slot_async(resource_group_name, name, slot, filter = nil, custom_headers = nil) + def add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? + fail ArgumentError, 'premier_add_on is nil' if premier_add_on.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -17633,19 +19667,27 @@ def list_perf_mon_counters_slot_async(resource_group_name, name, slot, filter = # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() + request_content = @client.serialize(request_mapper, premier_add_on) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, - skip_encoding_query_params: {'$filter' => filter}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response @@ -17661,7 +19703,7 @@ def list_perf_mon_counters_slot_async(resource_group_name, name, slot, filter = if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PerfMonCounterCollection.mapper() + result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -17675,62 +19717,65 @@ def list_perf_mon_counters_slot_async(resource_group_name, name, slot, filter = end # - # Gets web app's event logs. + # Delete a premier add-on from an app. # - # Gets web app's event logs. + # Delete a premier add-on from an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the named add-on for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [SitePhpErrorLogFlag] operation results. # - def get_site_php_error_log_flag_slot(resource_group_name, name, slot, custom_headers = nil) - response = get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, custom_headers).value! - response.body unless response.nil? + def delete_premier_add_on_slot(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) + response = delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers).value! + nil end # - # Gets web app's event logs. + # Delete a premier add-on from an app. # - # Gets web app's event logs. + # Delete a premier add-on from an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the named add-on for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_site_php_error_log_flag_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, custom_headers).value! + def delete_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) + delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers).value! end # - # Gets web app's event logs. + # Delete a premier add-on from an app. # - # Gets web app's event logs. + # Delete a premier add-on from an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param premier_add_on_name [String] Add-on name. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will delete the named add-on for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, custom_headers = nil) + def delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -17741,18 +19786,18 @@ def get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, cust # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response @@ -17764,16 +19809,6 @@ def get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, cust end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::SitePhpErrorLogFlag.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -17782,60 +19817,60 @@ def get_site_php_error_log_flag_slot_async(resource_group_name, name, slot, cust end # - # Gets the premier add-ons of an app. + # Get public certificates for an app or a deployment slot. # - # Gets the premier add-ons of an app. + # Get public certificates for an app or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the premier add-ons for the production slot. + # the API gets hostname bindings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PremierAddOn] operation results. + # @return [Array] operation results. # - def list_premier_add_ons_slot(resource_group_name, name, slot, custom_headers = nil) - response = list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_headers).value! - response.body unless response.nil? + def list_public_certificates_slot(resource_group_name, name, slot, custom_headers = nil) + first_page = list_public_certificates_slot_as_lazy(resource_group_name, name, slot, custom_headers) + first_page.get_all_items end # - # Gets the premier add-ons of an app. + # Get public certificates for an app or a deployment slot. # - # Gets the premier add-ons of an app. + # Get public certificates for an app or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the premier add-ons for the production slot. + # the API gets hostname bindings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_premier_add_ons_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_headers).value! + def list_public_certificates_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + list_public_certificates_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets the premier add-ons of an app. + # Get public certificates for an app or a deployment slot. # - # Gets the premier add-ons of an app. + # Get public certificates for an app or a deployment slot. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the premier add-ons for the production slot. + # the API gets hostname bindings for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_headers = nil) + def list_public_certificates_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -17848,7 +19883,7 @@ def list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_head # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates' request_url = @base_url || @client.base_url @@ -17875,7 +19910,7 @@ def list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_head if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() + result_mapper = Azure::ARM::Web::Models::PublicCertificateCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -17889,67 +19924,73 @@ def list_premier_add_ons_slot_async(resource_group_name, name, slot, custom_head end # - # Gets a named add-on of an app. + # Get the named public certificate for an app (or deployment slot, if + # specified). # - # Gets a named add-on of an app. + # Get the named public certificate for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the named add-on for the production slot. + # the API the named binding for the production slot. + # @param public_certificate_name [String] Public CertificateName # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PremierAddOn] operation results. + # @return [PublicCertificate] operation results. # - def get_premier_add_on_slot(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) - response = get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers).value! + def get_public_certificate_slot(resource_group_name, name, slot, public_certificate_name, custom_headers = nil) + response = get_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers).value! response.body unless response.nil? end # - # Gets a named add-on of an app. + # Get the named public certificate for an app (or deployment slot, if + # specified). # - # Gets a named add-on of an app. + # Get the named public certificate for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the named add-on for the production slot. + # the API the named binding for the production slot. + # @param public_certificate_name [String] Public CertificateName # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) - get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers).value! + def get_public_certificate_slot_with_http_info(resource_group_name, name, slot, public_certificate_name, custom_headers = nil) + get_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers).value! end # - # Gets a named add-on of an app. + # Get the named public certificate for an app (or deployment slot, if + # specified). # - # Gets a named add-on of an app. + # Get the named public certificate for an app (or deployment slot, if + # specified). # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the named add-on for the production slot. + # the API the named binding for the production slot. + # @param public_certificate_name [String] Public CertificateName # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) + def get_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -17959,13 +20000,13 @@ def get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'publicCertificateName' => public_certificate_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -17986,7 +20027,7 @@ def get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() + result_mapper = Azure::ARM::Web::Models::PublicCertificate.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -18000,73 +20041,73 @@ def get_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name end # - # Updates a named add-on of an app. + # Creates a hostname binding for an app. # - # Updates a named add-on of an app. + # Creates a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. - # @param premier_add_on [PremierAddOn] A JSON representation of the edited - # premier add-on. + # @param public_certificate_name [String] Public certificate name. + # @param public_certificate [PublicCertificate] Public certificate details. + # This is the JSON representation of a PublicCertificate object. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the named add-on for the production slot. + # the API will create a binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PremierAddOn] operation results. + # @return [PublicCertificate] operation results. # - def add_premier_add_on_slot(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers = nil) - response = add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers).value! + def create_or_update_public_certificate_slot(resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers = nil) + response = create_or_update_public_certificate_slot_async(resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers).value! response.body unless response.nil? end # - # Updates a named add-on of an app. + # Creates a hostname binding for an app. # - # Updates a named add-on of an app. + # Creates a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. - # @param premier_add_on [PremierAddOn] A JSON representation of the edited - # premier add-on. + # @param public_certificate_name [String] Public certificate name. + # @param public_certificate [PublicCertificate] Public certificate details. + # This is the JSON representation of a PublicCertificate object. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the named add-on for the production slot. + # the API will create a binding for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def add_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers = nil) - add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers).value! + def create_or_update_public_certificate_slot_with_http_info(resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers = nil) + create_or_update_public_certificate_slot_async(resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers).value! end # - # Updates a named add-on of an app. + # Creates a hostname binding for an app. # - # Updates a named add-on of an app. + # Creates a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. - # @param premier_add_on [PremierAddOn] A JSON representation of the edited - # premier add-on. + # @param public_certificate_name [String] Public certificate name. + # @param public_certificate [PublicCertificate] Public certificate details. + # This is the JSON representation of a PublicCertificate object. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will update the named add-on for the production slot. + # the API will create a binding for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers = nil) + def create_or_update_public_certificate_slot_async(resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? - fail ArgumentError, 'premier_add_on is nil' if premier_add_on.nil? + fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil? + fail ArgumentError, 'public_certificate is nil' if public_certificate.nil? fail ArgumentError, 'slot is nil' if slot.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -18081,17 +20122,17 @@ def add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() - request_content = @client.serialize(request_mapper, premier_add_on) + request_mapper = Azure::ARM::Web::Models::PublicCertificate.mapper() + request_content = @client.serialize(request_mapper, public_certificate) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'publicCertificateName' => public_certificate_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), @@ -18113,7 +20154,7 @@ def add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::PremierAddOn.mapper() + result_mapper = Azure::ARM::Web::Models::PublicCertificate.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -18127,66 +20168,66 @@ def add_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name end # - # Delete a premier add-on from an app. + # Deletes a hostname binding for an app. # - # Delete a premier add-on from an app. + # Deletes a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the named add-on for the production slot. + # the API will delete the binding for the production slot. + # @param public_certificate_name [String] Public Certificate Name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # - def delete_premier_add_on_slot(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) - response = delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers).value! + def delete_public_certificate_slot(resource_group_name, name, slot, public_certificate_name, custom_headers = nil) + response = delete_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers).value! nil end # - # Delete a premier add-on from an app. + # Deletes a hostname binding for an app. # - # Delete a premier add-on from an app. + # Deletes a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the named add-on for the production slot. + # the API will delete the binding for the production slot. + # @param public_certificate_name [String] Public Certificate Name. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def delete_premier_add_on_slot_with_http_info(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) - delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers).value! + def delete_public_certificate_slot_with_http_info(resource_group_name, name, slot, public_certificate_name, custom_headers = nil) + delete_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers).value! end # - # Delete a premier add-on from an app. + # Deletes a hostname binding for an app. # - # Delete a premier add-on from an app. + # Deletes a hostname binding for an app. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of the app. - # @param premier_add_on_name [String] Add-on name. # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will delete the named add-on for the production slot. + # the API will delete the binding for the production slot. + # @param public_certificate_name [String] Public Certificate Name. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_name, slot, custom_headers = nil) + def delete_public_certificate_slot_async(resource_group_name, name, slot, public_certificate_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'premier_add_on_name is nil' if premier_add_on_name.nil? fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'public_certificate_name is nil' if public_certificate_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -18196,13 +20237,13 @@ def delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_n # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'premierAddOnName' => premier_add_on_name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'publicCertificateName' => public_certificate_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -18213,7 +20254,7 @@ def delete_premier_add_on_slot_async(resource_group_name, name, premier_add_on_n http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -18366,9 +20407,9 @@ def list_publishing_profile_xml_with_secrets_slot_async(resource_group_name, nam # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots API. # @param slot [String] Name of web app slot. If not specified then will default # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that @@ -18385,9 +20426,9 @@ def recover_slot(resource_group_name, name, recovery_entity, slot, custom_header # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots API. # @param slot [String] Name of web app slot. If not specified then will default # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that @@ -18407,170 +20448,73 @@ def recover_slot_async(resource_group_name, name, recovery_entity, slot, custom_ parsed_response = @client.deserialize(result_mapper, parsed_response) end - # Waiting for response. - @client.get_long_running_operation_result(response, deserialize_method) - end - - promise - end - - # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. - # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API resets configuration settings for the production slot. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # - def reset_slot_configuration_slot(resource_group_name, name, slot, custom_headers = nil) - response = reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! - nil - end - - # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. - # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API resets configuration settings for the production slot. - # @param custom_headers [Hash{String => String}] A hash of custom headers that - # will be added to the HTTP request. - # - # @return [MsRestAzure::AzureOperationResponse] HTTP response information. - # - def reset_slot_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! - end - - # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. - # - # Resets the configuration settings of the current slot if they were previously - # modified by calling the API with POST. - # - # @param resource_group_name [String] Name of the resource group to which the - # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API resets configuration settings for the production slot. - # @param [Hash{String => String}] A hash of custom headers that will be added - # to the HTTP request. - # - # @return [Concurrent::Promise] Promise object which holds the HTTP response. - # - def reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) - fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'slot is nil' if slot.nil? - fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? - api_version = '2016-08-01' - - - request_headers = {} - - # Set Headers - request_headers['x-ms-client-request-id'] = SecureRandom.uuid - request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig' - - request_url = @base_url || @client.base_url - - options = { - middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, - query_params: {'api-version' => api_version}, - headers: request_headers.merge(custom_headers || {}), - base_url: request_url - } - promise = @client.make_request_async(:post, path_template, options) - - promise = promise.then do |result| - http_response = result.response - status_code = http_response.status - response_content = http_response.body - unless status_code == 200 - error_model = JSON.load(response_content) - fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) - end - - result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - - result + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) end - promise.execute + promise end # - # Gets the category of ResourceHealthMetadata to use for the given site + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # - # Gets the category of ResourceHealthMetadata to use for the given site + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API resets configuration settings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [ResourceHealthMetadata] operation results. # - def get_resource_health_metadata_slot(resource_group_name, name, slot, custom_headers = nil) - response = get_resource_health_metadata_slot_async(resource_group_name, name, slot, custom_headers).value! - response.body unless response.nil? + def reset_slot_configuration_slot(resource_group_name, name, slot, custom_headers = nil) + response = reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! + nil end # - # Gets the category of ResourceHealthMetadata to use for the given site + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # - # Gets the category of ResourceHealthMetadata to use for the given site + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API resets configuration settings for the production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def get_resource_health_metadata_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - get_resource_health_metadata_slot_async(resource_group_name, name, slot, custom_headers).value! + def reset_slot_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_headers).value! end # - # Gets the category of ResourceHealthMetadata to use for the given site + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # - # Gets the category of ResourceHealthMetadata to use for the given site + # Resets the configuration settings of the current slot if they were previously + # modified by calling the API with POST. # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of web app - # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API resets configuration settings for the production slot. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def get_resource_health_metadata_slot_async(resource_group_name, name, slot, custom_headers = nil) + def reset_slot_configuration_slot_async(resource_group_name, name, slot, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? @@ -18583,7 +20527,7 @@ def get_resource_health_metadata_slot_async(resource_group_name, name, slot, cus # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig' request_url = @base_url || @client.base_url @@ -18594,7 +20538,7 @@ def get_resource_health_metadata_slot_async(resource_group_name, name, slot, cus headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:get, path_template, options) + promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response @@ -18606,16 +20550,6 @@ def get_resource_health_metadata_slot_async(resource_group_name, name, slot, cus end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? - # Deserialize Response - if status_code == 200 - begin - parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::ResourceHealthMetadata.mapper() - result.body = @client.deserialize(result_mapper, parsed_response) - rescue Exception => e - fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) - end - end result end @@ -19546,7 +21480,7 @@ def sync_repository_slot_async(resource_group_name, name, slot, custom_headers = http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -21532,7 +23466,7 @@ def sync_repository_async(resource_group_name, name, custom_headers = nil) http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 204 + unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end @@ -22906,8 +24840,221 @@ def begin_restore_with_http_info(resource_group_name, name, backup_id, request, def begin_restore_async(resource_group_name, name, backup_id, request, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? - fail ArgumentError, 'backup_id is nil' if backup_id.nil? - fail ArgumentError, 'request is nil' if request.nil? + fail ArgumentError, 'backup_id is nil' if backup_id.nil? + fail ArgumentError, 'request is nil' if request.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::RestoreRequest.mapper() + request_content = @client.serialize(request_mapper, request) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::RestoreResponse.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets the Git/FTP publishing credentials of an app. + # + # Gets the Git/FTP publishing credentials of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [User] operation results. + # + def begin_list_publishing_credentials(resource_group_name, name, custom_headers = nil) + response = begin_list_publishing_credentials_async(resource_group_name, name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the Git/FTP publishing credentials of an app. + # + # Gets the Git/FTP publishing credentials of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_list_publishing_credentials_with_http_info(resource_group_name, name, custom_headers = nil) + begin_list_publishing_credentials_async(resource_group_name, name, custom_headers).value! + end + + # + # Gets the Git/FTP publishing credentials of an app. + # + # Gets the Git/FTP publishing credentials of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_list_publishing_credentials_async(resource_group_name, name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::User.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Invoke the MSDeploy web app extension as pass-through API + # + # Invoke the MSDeploy web app extension as pass-through API + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param msdeploy [MSDeploy] Details of MSDeploy operation + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MSDeployStatus] operation results. + # + def begin_create_msdeploy_operation(resource_group_name, name, msdeploy, custom_headers = nil) + response = begin_create_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers).value! + response.body unless response.nil? + end + + # + # Invoke the MSDeploy web app extension as pass-through API + # + # Invoke the MSDeploy web app extension as pass-through API + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param msdeploy [MSDeploy] Details of MSDeploy operation + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_msdeploy_operation_with_http_info(resource_group_name, name, msdeploy, custom_headers = nil) + begin_create_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers).value! + end + + # + # Invoke the MSDeploy web app extension as pass-through API + # + # Invoke the MSDeploy web app extension as pass-through API + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param msdeploy [MSDeploy] Details of MSDeploy operation + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_msdeploy_operation_async(resource_group_name, name, msdeploy, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'msdeploy is nil' if msdeploy.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -22921,39 +25068,39 @@ def begin_restore_async(resource_group_name, name, backup_id, request, custom_he request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::RestoreRequest.mapper() - request_content = @client.serialize(request_mapper, request) + request_mapper = Azure::ARM::Web::Models::MSDeploy.mapper() + request_content = @client.serialize(request_mapper, msdeploy) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 201 || status_code == 409 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response - if status_code == 200 + if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RestoreResponse.mapper() + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -22967,56 +25114,64 @@ def begin_restore_async(resource_group_name, name, backup_id, request, custom_he end # - # Gets the Git/FTP publishing credentials of an app. + # Invoke the MSDeploy web app extension as pass-through API # - # Gets the Git/FTP publishing credentials of an app. + # Invoke the MSDeploy web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Name of web app + # @param instance_id [String] Id of web app instance + # @param msdeploy [MSDeploy] Details of MSDeploy operation # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [User] operation results. + # @return [MSDeployStatus] operation results. # - def begin_list_publishing_credentials(resource_group_name, name, custom_headers = nil) - response = begin_list_publishing_credentials_async(resource_group_name, name, custom_headers).value! + def begin_create_instance_msdeploy_operation(resource_group_name, name, instance_id, msdeploy, custom_headers = nil) + response = begin_create_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers).value! response.body unless response.nil? end # - # Gets the Git/FTP publishing credentials of an app. + # Invoke the MSDeploy web app extension as pass-through API # - # Gets the Git/FTP publishing credentials of an app. + # Invoke the MSDeploy web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Name of web app + # @param instance_id [String] Id of web app instance + # @param msdeploy [MSDeploy] Details of MSDeploy operation # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_list_publishing_credentials_with_http_info(resource_group_name, name, custom_headers = nil) - begin_list_publishing_credentials_async(resource_group_name, name, custom_headers).value! + def begin_create_instance_msdeploy_operation_with_http_info(resource_group_name, name, instance_id, msdeploy, custom_headers = nil) + begin_create_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers).value! end # - # Gets the Git/FTP publishing credentials of an app. + # Invoke the MSDeploy web app extension as pass-through API # - # Gets the Git/FTP publishing credentials of an app. + # Invoke the MSDeploy web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. + # @param name [String] Name of web app + # @param instance_id [String] Id of web app instance + # @param msdeploy [MSDeploy] Details of MSDeploy operation # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_list_publishing_credentials_async(resource_group_name, name, custom_headers = nil) + def begin_create_instance_msdeploy_operation_async(resource_group_name, name, instance_id, msdeploy, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? + fail ArgumentError, 'msdeploy is nil' if msdeploy.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -23026,34 +25181,43 @@ def begin_list_publishing_credentials_async(resource_group_name, name, custom_he # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::MSDeploy.mapper() + request_content = @client.serialize(request_mapper, msdeploy) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 201 || status_code == 409 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response - if status_code == 200 + if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::User.mapper() + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -23307,9 +25471,9 @@ def begin_migrate_my_sql_async(resource_group_name, name, migration_request_enve # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots API. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -23328,9 +25492,9 @@ def begin_recover(resource_group_name, name, recovery_entity, custom_headers = n # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots API. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # @@ -23348,9 +25512,9 @@ def begin_recover_with_http_info(resource_group_name, name, recovery_entity, cus # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots API. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # @@ -23373,7 +25537,7 @@ def begin_recover_async(resource_group_name, name, recovery_entity, custom_heade request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::CsmSiteRecoveryEntity.mapper() + request_mapper = Azure::ARM::Web::Models::SnapshotRecoveryRequest.mapper() request_content = @client.serialize(request_mapper, recovery_entity) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil @@ -23676,29 +25840,256 @@ def begin_restore_slot_async(resource_group_name, name, backup_id, request, slot options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'backupId' => backup_id,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::RestoreResponse.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets the Git/FTP publishing credentials of an app. + # + # Gets the Git/FTP publishing credentials of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the publishing credentials for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [User] operation results. + # + def begin_list_publishing_credentials_slot(resource_group_name, name, slot, custom_headers = nil) + response = begin_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the Git/FTP publishing credentials of an app. + # + # Gets the Git/FTP publishing credentials of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the publishing credentials for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_list_publishing_credentials_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) + begin_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers).value! + end + + # + # Gets the Git/FTP publishing credentials of an app. + # + # Gets the Git/FTP publishing credentials of an app. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API will get the publishing credentials for the production slot. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::User.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Invoke the MSDeploy web app extension as pass-through API + # + # Invoke the MSDeploy web app extension as pass-through API + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param msdeploy [MSDeploy] Details of MSDeploy operation + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MSDeployStatus] operation results. + # + def begin_create_msdeploy_operation_slot(resource_group_name, name, slot, msdeploy, custom_headers = nil) + response = begin_create_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers).value! + response.body unless response.nil? + end + + # + # Invoke the MSDeploy web app extension as pass-through API + # + # Invoke the MSDeploy web app extension as pass-through API + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param msdeploy [MSDeploy] Details of MSDeploy operation + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_msdeploy_operation_slot_with_http_info(resource_group_name, name, slot, msdeploy, custom_headers = nil) + begin_create_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers).value! + end + + # + # Invoke the MSDeploy web app extension as pass-through API + # + # Invoke the MSDeploy web app extension as pass-through API + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param msdeploy [MSDeploy] Details of MSDeploy operation + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_msdeploy_operation_slot_async(resource_group_name, name, slot, msdeploy, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'name is nil' if name.nil? + fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'msdeploy is nil' if msdeploy.nil? + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + api_version = '2016-08-01' + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::MSDeploy.mapper() + request_content = @client.serialize(request_mapper, msdeploy) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 201 || status_code == 409 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response - if status_code == 200 + if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::RestoreResponse.mapper() + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -23712,63 +26103,71 @@ def begin_restore_slot_async(resource_group_name, name, backup_id, request, slot end # - # Gets the Git/FTP publishing credentials of an app. + # Invoke the MSDeploy web app extension as pass-through API # - # Gets the Git/FTP publishing credentials of an app. + # Invoke the MSDeploy web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the publishing credentials for the production slot. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] Id of web app instance + # @param msdeploy [MSDeploy] Details of MSDeploy operation # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [User] operation results. + # @return [MSDeployStatus] operation results. # - def begin_list_publishing_credentials_slot(resource_group_name, name, slot, custom_headers = nil) - response = begin_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers).value! + def begin_create_instance_msdeploy_operation_slot(resource_group_name, name, slot, instance_id, msdeploy, custom_headers = nil) + response = begin_create_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers).value! response.body unless response.nil? end # - # Gets the Git/FTP publishing credentials of an app. + # Invoke the MSDeploy web app extension as pass-through API # - # Gets the Git/FTP publishing credentials of an app. + # Invoke the MSDeploy web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the publishing credentials for the production slot. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] Id of web app instance + # @param msdeploy [MSDeploy] Details of MSDeploy operation # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def begin_list_publishing_credentials_slot_with_http_info(resource_group_name, name, slot, custom_headers = nil) - begin_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers).value! + def begin_create_instance_msdeploy_operation_slot_with_http_info(resource_group_name, name, slot, instance_id, msdeploy, custom_headers = nil) + begin_create_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers).value! end # - # Gets the Git/FTP publishing credentials of an app. + # Invoke the MSDeploy web app extension as pass-through API # - # Gets the Git/FTP publishing credentials of an app. + # Invoke the MSDeploy web app extension as pass-through API # # @param resource_group_name [String] Name of the resource group to which the # resource belongs. - # @param name [String] Name of the app. - # @param slot [String] Name of the deployment slot. If a slot is not specified, - # the API will get the publishing credentials for the production slot. + # @param name [String] Name of web app + # @param slot [String] Name of web app slot. If not specified then will default + # to production slot. + # @param instance_id [String] Id of web app instance + # @param msdeploy [MSDeploy] Details of MSDeploy operation # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def begin_list_publishing_credentials_slot_async(resource_group_name, name, slot, custom_headers = nil) + def begin_create_instance_msdeploy_operation_slot_async(resource_group_name, name, slot, instance_id, msdeploy, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'slot is nil' if slot.nil? + fail ArgumentError, 'instance_id is nil' if instance_id.nil? + fail ArgumentError, 'msdeploy is nil' if msdeploy.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? api_version = '2016-08-01' @@ -23778,34 +26177,43 @@ def begin_list_publishing_credentials_slot_async(resource_group_name, name, slot # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list' + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Web::Models::MSDeploy.mapper() + request_content = @client.serialize(request_mapper, msdeploy) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, + body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } - promise = @client.make_request_async(:post, path_template, options) + promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body - unless status_code == 200 + unless status_code == 201 || status_code == 409 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response - if status_code == 200 + if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Web::Models::User.mapper() + result_mapper = Azure::ARM::Web::Models::MSDeployStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -23826,9 +26234,9 @@ def begin_list_publishing_credentials_slot_async(resource_group_name, name, slot # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots API. # @param slot [String] Name of web app slot. If not specified then will default # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that @@ -23849,9 +26257,9 @@ def begin_recover_slot(resource_group_name, name, recovery_entity, slot, custom_ # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots API. # @param slot [String] Name of web app slot. If not specified then will default # to production slot. # @param custom_headers [Hash{String => String}] A hash of custom headers that @@ -23871,9 +26279,9 @@ def begin_recover_slot_with_http_info(resource_group_name, name, recovery_entity # @param resource_group_name [String] Name of the resource group to which the # resource belongs. # @param name [String] Name of web app - # @param recovery_entity [CsmSiteRecoveryEntity] Snapshot data used for web app - # recovery. Snapshot information can be obtained by calling GetDeletedSites or - # GetSiteSnapshots API. + # @param recovery_entity [SnapshotRecoveryRequest] Snapshot data used for web + # app recovery. Snapshot information can be obtained by calling GetDeletedSites + # or GetSiteSnapshots API. # @param slot [String] Name of web app slot. If not specified then will default # to production slot. # @param [Hash{String => String}] A hash of custom headers that will be added @@ -23899,7 +26307,7 @@ def begin_recover_slot_async(resource_group_name, name, recovery_entity, slot, c request_headers['Content-Type'] = 'application/json; charset=utf-8' # Serialize Request - request_mapper = Azure::ARM::Web::Models::CsmSiteRecoveryEntity.mapper() + request_mapper = Azure::ARM::Web::Models::SnapshotRecoveryRequest.mapper() request_content = @client.serialize(request_mapper, recovery_entity) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil @@ -25548,6 +27956,99 @@ def list_perf_mon_counters_next_async(next_page_link, custom_headers = nil) promise.execute end + # + # Get public certificates for an app or a deployment slot. + # + # Get public certificates for an app or a deployment slot. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PublicCertificateCollection] operation results. + # + def list_public_certificates_next(next_page_link, custom_headers = nil) + response = list_public_certificates_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get public certificates for an app or a deployment slot. + # + # Get public certificates for an app or a deployment slot. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_public_certificates_next_with_http_info(next_page_link, custom_headers = nil) + list_public_certificates_next_async(next_page_link, custom_headers).value! + end + + # + # Get public certificates for an app or a deployment slot. + # + # Get public certificates for an app or a deployment slot. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_public_certificates_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::PublicCertificateCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + # # Gets an app's deployment slots. # @@ -26583,6 +29084,99 @@ def list_perf_mon_counters_slot_next_async(next_page_link, custom_headers = nil) promise.execute end + # + # Get public certificates for an app or a deployment slot. + # + # Get public certificates for an app or a deployment slot. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PublicCertificateCollection] operation results. + # + def list_public_certificates_slot_next(next_page_link, custom_headers = nil) + response = list_public_certificates_slot_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get public certificates for an app or a deployment slot. + # + # Get public certificates for an app or a deployment slot. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_public_certificates_slot_next_with_http_info(next_page_link, custom_headers = nil) + list_public_certificates_slot_next_async(next_page_link, custom_headers).value! + end + + # + # Get public certificates for an app or a deployment slot. + # + # Get public certificates for an app or a deployment slot. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_public_certificates_slot_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Web::Models::PublicCertificateCollection.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + # # Get the difference in configuration settings between two web app slots. # @@ -27469,6 +30063,31 @@ def list_perf_mon_counters_as_lazy(resource_group_name, name, filter = nil, cust end end + # + # Get public certificates for an app or a deployment slot. + # + # Get public certificates for an app or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PublicCertificateCollection] which provide lazy access to pages of + # the response. + # + def list_public_certificates_as_lazy(resource_group_name, name, custom_headers = nil) + response = list_public_certificates_async(resource_group_name, name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_public_certificates_next_async(next_page_link, custom_headers) + end + page + end + end + # # Gets an app's deployment slots. # @@ -27759,7 +30378,7 @@ def list_metrics_slot_as_lazy(resource_group_name, name, slot, details = nil, fi # resource belongs. # @param name [String] Name of web app # @param slot [String] Name of web app slot. If not specified then will default - # to production slot. **** CURRENTLY UNUSED ***** + # to production slot. # @param filter [String] Return only usages/metrics specified in the filter. # Filter conforms to odata syntax. Example: $filter=(startTime eq # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq @@ -27781,6 +30400,33 @@ def list_perf_mon_counters_slot_as_lazy(resource_group_name, name, slot, filter end end + # + # Get public certificates for an app or a deployment slot. + # + # Get public certificates for an app or a deployment slot. + # + # @param resource_group_name [String] Name of the resource group to which the + # resource belongs. + # @param name [String] Name of the app. + # @param slot [String] Name of the deployment slot. If a slot is not specified, + # the API gets hostname bindings for the production slot. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [PublicCertificateCollection] which provide lazy access to pages of + # the response. + # + def list_public_certificates_slot_as_lazy(resource_group_name, name, slot, custom_headers = nil) + response = list_public_certificates_slot_async(resource_group_name, name, slot, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_public_certificates_slot_next_async(next_page_link, custom_headers) + end + page + end + end + # # Get the difference in configuration settings between two web app slots. # diff --git a/management/azure_mgmt_web/lib/generated/azure_mgmt_web/web_site_management_client.rb b/management/azure_mgmt_web/lib/generated/azure_mgmt_web/web_site_management_client.rb old mode 100755 new mode 100644