Elastacloud.AzureManagement.Fluent.Services.Classes.HostedServiceActivity.Create C# (CSharp) Method

Create() public method

Used to create a hosted service with a service certificate if specified
public Create ( ) : void
return void
        public void Create()
        {
            // create the hosted service here
            var description = _manager.Description ?? "Fluent Management created cloud service";
            var location = _manager.Location ?? LocationConstants.NorthEurope;
            _client.CreateNewCloudService(location, description);
            if (_manager.ServiceCertificate == null)
                return;
            // first of all upload the service certificate
            _client.UploadServiceCertificate(_manager.ServiceCertificate.Certificate, _manager.ServiceCertificate.PvkPassword);
        }

Usage Example

 /// <summary>
 /// Used to create a hosted service only without an attached deployment
 /// </summary>
 void IDeploymentConfigurationParamActivity.GoHostedServiceDeployment()
 {
     var create = new HostedServiceActivity(this);
     create.Create();
 }