/// <summary>
 /// Handles requests to list all resources in a resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <ServiceResource> > ListNextAsync(this IServicesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets a list of all Search services in the given resource group.
 /// <see href="https://aka.ms/search-manage" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the current subscription. You can
 /// obtain this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='searchManagementRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <SearchService> > ListByResourceGroupAsync(this IServicesOperations operations, string resourceGroupName, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, searchManagementRequestOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Checks that the resource name is valid and is not already in use.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// the region
 /// </param>
 /// <param name='availabilityParameters'>
 /// Parameters supplied to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <NameAvailability> CheckNameAvailabilityAsync(this IServicesOperations operations, string location, NameAvailabilityParameters availabilityParameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(location, availabilityParameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Operation to update an exiting Service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='resource'>
 /// Parameters for the update operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ServiceResource> BeginUpdateAsync(this IServicesOperations operations, string resourceGroupName, string serviceName, ServiceResource resource, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, resource, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Regenerate a test key for a Service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='regenerateTestKeyRequest'>
 /// Parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <TestKeys> RegenerateTestKeyAsync(this IServicesOperations operations, string resourceGroupName, string serviceName, RegenerateTestKeyRequestPayload regenerateTestKeyRequest, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.RegenerateTestKeyWithHttpMessagesAsync(resourceGroupName, serviceName, regenerateTestKeyRequest, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Enable test endpoint functionality for a Service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <TestKeys> EnableTestEndpointAsync(this IServicesOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.EnableTestEndpointWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#7
0
 /// <summary>
 /// Returns a list of all Search services in the given resource group.
 /// <see href="https://msdn.microsoft.com/library/azure/dn832688.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the current subscription.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SearchServiceListResult> ListAsync(this IServicesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Generate Service Access Token.
 /// </summary>
 /// <remarks>
 /// Gets access token that can be used for calling service.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// The Azure Subscription ID.
 /// </param>
 /// <param name='resourceGroup'>
 /// The Name of the resource group in which the workspace is located.
 /// </param>
 /// <param name='workspace'>
 /// The name of the workspace.
 /// </param>
 /// <param name='id'>
 /// The Service Id.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <AuthToken> GetServiceTokenAsync(this IServicesOperations operations, System.Guid subscriptionId, string resourceGroup, string workspace, string id, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetServiceTokenWithHttpMessagesAsync(subscriptionId, resourceGroup, workspace, id, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Get a Service.
 /// </summary>
 /// <remarks>
 /// Get a Service by Id.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// The Azure Subscription ID.
 /// </param>
 /// <param name='resourceGroup'>
 /// The Name of the resource group in which the workspace is located.
 /// </param>
 /// <param name='workspace'>
 /// The name of the workspace.
 /// </param>
 /// <param name='id'>
 /// The Service Id.
 /// </param>
 /// <param name='expand'>
 /// Set to True to include Model details.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ServiceResponseBase> QueryByIdAsync(this IServicesOperations operations, System.Guid subscriptionId, string resourceGroup, string workspace, string id, bool?expand = false, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.QueryByIdWithHttpMessagesAsync(subscriptionId, resourceGroup, workspace, id, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Query the list of Services in a Workspace.
 /// </summary>
 /// <remarks>
 /// If no filter is passed, the query lists all Services in the Workspace. The
 /// returned list is paginated and the count of item in each page is an
 /// optional parameter.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// The Azure Subscription ID.
 /// </param>
 /// <param name='resourceGroup'>
 /// The Name of the resource group in which the workspace is located.
 /// </param>
 /// <param name='workspace'>
 /// The name of the workspace.
 /// </param>
 /// <param name='imageId'>
 /// The Image Id.
 /// </param>
 /// <param name='imageName'>
 /// The Image name.
 /// </param>
 /// <param name='modelId'>
 /// The Model Id.
 /// </param>
 /// <param name='modelName'>
 /// The Model name.
 /// </param>
 /// <param name='name'>
 /// The object name.
 /// </param>
 /// <param name='count'>
 /// The number of items to retrieve in a page.
 /// </param>
 /// <param name='computeType'>
 /// The compute environment type.
 /// </param>
 /// <param name='skipToken'>
 /// The continuation token to retrieve the next page.
 /// </param>
 /// <param name='tags'>
 /// A set of tags with which to filter the returned models.
 /// It is a comma separated string of tags key or tags key=value
 /// Example: tagKey1,tagKey2,tagKey3=value3
 /// </param>
 /// <param name='properties'>
 /// A set of properties with which to filter the returned models.
 /// It is a comma separated string of properties key and/or properties
 /// key=value
 /// Example: propKey1,propKey2,propKey3=value3
 /// </param>
 /// <param name='expand'>
 /// Set to True to include Model details.
 /// </param>
 /// <param name='orderby'>
 /// The option to order the response. Possible values include: 'CreatedAtDesc',
 /// 'CreatedAtAsc', 'UpdatedAtDesc', 'UpdatedAtAsc'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <ServiceResponseBase> > ListQueryAsync(this IServicesOperations operations, System.Guid subscriptionId, string resourceGroup, string workspace, string imageId = default(string), string imageName = default(string), string modelId = default(string), string modelName = default(string), string name = default(string), int?count = default(int?), string computeType = default(string), string skipToken = default(string), string tags = default(string), string properties = default(string), bool?expand = false, string orderby = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListQueryWithHttpMessagesAsync(subscriptionId, resourceGroup, workspace, imageId, imageName, modelId, modelName, name, count, computeType, skipToken, tags, properties, expand, orderby, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Create or update DMS Instance
 /// </summary>
 /// <remarks>
 /// The services resource is the top-level resource that represents the
 /// Database Migration Service. The PUT method creates a new service or updates
 /// an existing one. When a service is updated, existing child resources (i.e.
 /// tasks) are unaffected. Services currently support a single kind, "vm",
 /// which refers to a VM-based service, although other kinds may be added in
 /// the future. This method can change the kind, SKU, and network of the
 /// service, but if tasks are currently running (i.e. the service is busy),
 /// this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will
 /// reply when successful with 200 OK or 201 Created. Long-running operations
 /// use the provisioningState property.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='parameters'>
 /// Information about the service
 /// </param>
 /// <param name='groupName'>
 /// Name of the resource group
 /// </param>
 /// <param name='serviceName'>
 /// Name of the service
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DataMigrationService> CreateOrUpdateAsync(this IServicesOperations operations, DataMigrationService parameters, string groupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(parameters, groupName, serviceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Get services in subscription
 /// </summary>
 /// <remarks>
 /// The services resource is the top-level resource that represents the
 /// Database Migration Service. This method returns a list of service resources
 /// in a subscription.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <DataMigrationService> > ListAsync(this IServicesOperations operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Get compatible SKUs
 /// </summary>
 /// <remarks>
 /// The services resource is the top-level resource that represents the
 /// Database Migration Service. The skus action returns the list of SKUs that a
 /// service resource can be updated to.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupName'>
 /// Name of the resource group
 /// </param>
 /// <param name='serviceName'>
 /// Name of the service
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <AvailableServiceSku> > ListSkusAsync(this IServicesOperations operations, string groupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListSkusWithHttpMessagesAsync(groupName, serviceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets a Service Fabric service resource.
 /// </summary>
 /// <remarks>
 /// Get a Service Fabric service resource created or in the process of being
 /// created in the Service Fabric application resource.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the cluster resource.
 /// </param>
 /// <param name='applicationName'>
 /// The name of the application resource.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the service resource in the format of
 /// {applicationName}~{serviceName}.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ServiceResource> GetAsync(this IServicesOperations operations, string resourceGroupName, string clusterName, string applicationName, string serviceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, clusterName, applicationName, serviceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 public ChangeServiceCommand(string name, IServicesOperations serviceOperations, IServiceInfoContainer serviceInfoContainer,
                             Menu managerMenu)
 {
     Name = name;
     _serviceOperations    = serviceOperations;
     _managerMenu          = managerMenu;
     _serviceInfoContainer = serviceInfoContainer;
 }
 public ServicesController(IServiceInfoContainer serviceInfoContainer,
                           IUsersContainer usersContainer, IUsersOperations usersOperations,
                           IServicesOperations servicesOperations, IOrdersContainer ordersContainer)
 {
     _usersOperations      = usersOperations;
     _servicesOperations   = servicesOperations;
     _ordersContainer      = ordersContainer;
     _serviceInfoContainer = serviceInfoContainer;
     _usersContainer       = usersContainer;
 }
示例#17
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Clusters                = new ClustersOperations(this);
     ClusterVersions         = new ClusterVersionsOperations(this);
     Operations              = new Operations(this);
     ApplicationTypes        = new ApplicationTypesOperations(this);
     ApplicationTypeVersions = new ApplicationTypeVersionsOperations(this);
     Applications            = new ApplicationsOperations(this);
     Services                = new ServicesOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     ApiVersion     = "2019-03-01-preview";
     AcceptLanguage = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <PartitionSchemeDescription>("partitionScheme"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <PartitionSchemeDescription>("partitionScheme"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <ServicePlacementPolicyDescription>("Type"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <ServicePlacementPolicyDescription>("Type"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <ServiceResourceProperties>("serviceKind"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <ServiceResourceProperties>("serviceKind"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <ServiceResourceUpdateProperties>("serviceKind"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <ServiceResourceUpdateProperties>("serviceKind"));
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
示例#18
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Operations     = new Operations(this);
     AdminKeys      = new AdminKeysOperations(this);
     QueryKeys      = new QueryKeysOperations(this);
     Services       = new ServicesOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     ApiVersion     = "2015-08-19";
     AcceptLanguage = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
示例#19
0
 /// <summary>
 /// Deletes a Service Fabric service resource.
 /// </summary>
 /// <remarks>
 /// Delete a Service Fabric service resource with the specified name.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the cluster resource.
 /// </param>
 /// <param name='applicationName'>
 /// The name of the application resource.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the service resource in the format of
 /// {applicationName}~{serviceName}.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IServicesOperations operations, string resourceGroupName, string clusterName, string applicationName, string serviceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, clusterName, applicationName, serviceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
示例#20
0
 /// <summary>
 /// Gets a Service Fabric service resource.
 /// </summary>
 /// <remarks>
 /// Get a Service Fabric service resource created or in the process of being
 /// created in the Service Fabric application resource.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the cluster resource.
 /// </param>
 /// <param name='applicationName'>
 /// The name of the application resource.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the service resource in the format of
 /// {applicationName}~{serviceName}.
 /// </param>
 public static ServiceResource Get(this IServicesOperations operations, string resourceGroupName, string clusterName, string applicationName, string serviceName)
 {
     return(operations.GetAsync(resourceGroupName, clusterName, applicationName, serviceName).GetAwaiter().GetResult());
 }
示例#21
0
 /// <summary>
 /// Deletes a Service Fabric service resource.
 /// </summary>
 /// <remarks>
 /// Delete a Service Fabric service resource with the specified name.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the cluster resource.
 /// </param>
 /// <param name='applicationName'>
 /// The name of the application resource.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the service resource in the format of
 /// {applicationName}~{serviceName}.
 /// </param>
 public static void BeginDelete(this IServicesOperations operations, string resourceGroupName, string clusterName, string applicationName, string serviceName)
 {
     operations.BeginDeleteAsync(resourceGroupName, clusterName, applicationName, serviceName).GetAwaiter().GetResult();
 }
示例#22
0
 /// <summary>
 /// Create a new Service or update an exiting Service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='resource'>
 /// Parameters for the create or update operation
 /// </param>
 public static ServiceResource CreateOrUpdate(this IServicesOperations operations, string resourceGroupName, string serviceName, ServiceResource resource = default(ServiceResource))
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, serviceName, resource).GetAwaiter().GetResult());
 }
示例#23
0
 /// <summary>
 /// Updates a Service Fabric service resource.
 /// </summary>
 /// <remarks>
 /// Update a Service Fabric service resource with the specified name.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the cluster resource.
 /// </param>
 /// <param name='applicationName'>
 /// The name of the application resource.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the service resource in the format of
 /// {applicationName}~{serviceName}.
 /// </param>
 /// <param name='parameters'>
 /// The service resource for patch operations.
 /// </param>
 public static ServiceResourceUpdate BeginUpdate(this IServicesOperations operations, string resourceGroupName, string clusterName, string applicationName, string serviceName, ServiceResourceUpdate parameters)
 {
     return(operations.BeginUpdateAsync(resourceGroupName, clusterName, applicationName, serviceName, parameters).GetAwaiter().GetResult());
 }
示例#24
0
 /// <summary>
 /// Handles requests to list all resources in a resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 public static IPage <ServiceResource> List(this IServicesOperations operations, string resourceGroupName)
 {
     return(operations.ListAsync(resourceGroupName).GetAwaiter().GetResult());
 }
示例#25
0
 /// <summary>
 /// Handles requests to list all resources in a resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <ServiceResource> ListNext(this IServicesOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
示例#26
0
 /// <summary>
 /// Handles requests to list all resources in a subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <ServiceResource> ListBySubscription(this IServicesOperations operations)
 {
     return(operations.ListBySubscriptionAsync().GetAwaiter().GetResult());
 }
示例#27
0
 /// <summary>
 /// Checks that the resource name is valid and is not already in use.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// the region
 /// </param>
 /// <param name='availabilityParameters'>
 /// Parameters supplied to the operation.
 /// </param>
 public static NameAvailability CheckNameAvailability(this IServicesOperations operations, string location, NameAvailabilityParameters availabilityParameters)
 {
     return(operations.CheckNameAvailabilityAsync(location, availabilityParameters).GetAwaiter().GetResult());
 }
示例#28
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 public static TestKeys EnableTestEndpoint(this IServicesOperations operations, string resourceGroupName, string serviceName)
 {
     return(operations.EnableTestEndpointAsync(resourceGroupName, serviceName).GetAwaiter().GetResult());
 }
示例#29
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DisableTestEndpointAsync(this IServicesOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DisableTestEndpointWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
示例#30
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 public static void DisableTestEndpoint(this IServicesOperations operations, string resourceGroupName, string serviceName)
 {
     operations.DisableTestEndpointAsync(resourceGroupName, serviceName).GetAwaiter().GetResult();
 }