C# Class Elastacloud.AzureManagement.Fluent.Clients.ServiceClient

Inheritance: IServiceClient
Mostra file Open project: azurecoder/fluent-management Class Usage Examples

Public Methods

Method Description
CreateNewCloudService ( string location, string description = "Fluent Management created cloud service" ) : void

Creates a new cloud service

CreateServiceCertificateAndAddRemoteDesktop ( string username, string password, CscfgFile &file ) : ServiceCertificate

Creates a service certificate and adds to the remote config

CreateServiceCertificateExportToFileSystem ( string name, string password, string exportDirectory ) : CertificateGenerator

Creates a service certificate

CreateServiceCertificateExportToStorage ( string name, string password, string storageAccountName, string container, string folder ) : CertificateGenerator

Exports a service certificate to Windows Azure Storage

DeleteCloudService ( ) : void

Used to delete the current cloud service

DeleteCloudServiceAndDeployment ( string deploymentName ) : void

Deletes a cloud service and removes all of the .vhds for vms associated with the production deployment

DeleteDeployment ( DeploymentSlot slot = DeploymentSlot.Production ) : void

Used to delete a deployment in a respective slot

DeployServiceToAzure ( PaaSDeploymentSettings settings ) : void

Used to deploy a cloud service package to Azure

GetRoleInstances ( ) : IEnumerable

Gets the status of all role instances in a deployment

ServiceClient ( string subscriptionId, X509Certificate2 certificate, string cloudService, DeploymentSlot slot = DeploymentSlot.Production ) : System

Used to construct the ServiceClient

Start ( ) : void

Starts all of the roles within a cloud service

Stop ( ) : void

Stops all of the roles within a cloud service

UpdateRoleInstanceCount ( string roleName, int instanceCount ) : void

Updates a role instance count within a cloud services

UploadServiceCertificate ( X509Certificate2 certificate, string password = "", bool includePrivateKey = false ) : void

Uploads a certificate given a valid service certificate and password

UploadServiceCertificate ( string thumbprint, string password ) : void

Adds a services certificate to the cloud service

Private Methods

Method Description
BuildCertGenerator ( string name, string password ) : CertificateGenerator

Method Details

CreateNewCloudService() public method

Creates a new cloud service
public CreateNewCloudService ( string location, string description = "Fluent Management created cloud service" ) : void
location string the data centre location of the cloud service
description string The description of the cloud service
return void

CreateServiceCertificateAndAddRemoteDesktop() public method

Creates a service certificate and adds to the remote config
public CreateServiceCertificateAndAddRemoteDesktop ( string username, string password, CscfgFile &file ) : ServiceCertificate
username string
password string
file Elastacloud.AzureManagement.Fluent.Types.CscfgFile
return Elastacloud.AzureManagement.Fluent.Services.Classes.ServiceCertificate

CreateServiceCertificateExportToFileSystem() public method

Creates a service certificate
public CreateServiceCertificateExportToFileSystem ( string name, string password, string exportDirectory ) : CertificateGenerator
name string The name (CN) of the certificate
password string The password of the certificate
exportDirectory string Where the .pem, .cer and pfx will be put
return Elastacloud.AzureManagement.Fluent.Helpers.CertificateGenerator

CreateServiceCertificateExportToStorage() public method

Exports a service certificate to Windows Azure Storage
public CreateServiceCertificateExportToStorage ( string name, string password, string storageAccountName, string container, string folder ) : CertificateGenerator
name string
password string
storageAccountName string
container string
folder string
return Elastacloud.AzureManagement.Fluent.Helpers.CertificateGenerator

DeleteCloudService() public method

Used to delete the current cloud service
public DeleteCloudService ( ) : void
return void

DeleteCloudServiceAndDeployment() public method

Deletes a cloud service and removes all of the .vhds for vms associated with the production deployment
public DeleteCloudServiceAndDeployment ( string deploymentName ) : void
deploymentName string The name of the deployment to delete
return void

DeleteDeployment() public method

Used to delete a deployment in a respective slot
public DeleteDeployment ( DeploymentSlot slot = DeploymentSlot.Production ) : void
slot DeploymentSlot Either production or staging
return void

DeployServiceToAzure() public method

Used to deploy a cloud service package to Azure
public DeployServiceToAzure ( PaaSDeploymentSettings settings ) : void
settings Elastacloud.AzureManagement.Fluent.Clients.Interfaces.PaaSDeploymentSettings
return void

GetRoleInstances() public method

Gets the status of all role instances in a deployment
public GetRoleInstances ( ) : IEnumerable
return IEnumerable

ServiceClient() public method

Used to construct the ServiceClient
public ServiceClient ( string subscriptionId, X509Certificate2 certificate, string cloudService, DeploymentSlot slot = DeploymentSlot.Production ) : System
subscriptionId string
certificate System.Security.Cryptography.X509Certificates.X509Certificate2
cloudService string
slot DeploymentSlot
return System

Start() public method

Starts all of the roles within a cloud service
public Start ( ) : void
return void

Stop() public method

Stops all of the roles within a cloud service
public Stop ( ) : void
return void

UpdateRoleInstanceCount() public method

Updates a role instance count within a cloud services
public UpdateRoleInstanceCount ( string roleName, int instanceCount ) : void
roleName string
instanceCount int
return void

UploadServiceCertificate() public method

Uploads a certificate given a valid service certificate and password
public UploadServiceCertificate ( X509Certificate2 certificate, string password = "", bool includePrivateKey = false ) : void
certificate System.Security.Cryptography.X509Certificates.X509Certificate2 The certificate being uploaded
password string The .pfx password for the certificate
includePrivateKey bool The .pfx password for the certificate
return void

UploadServiceCertificate() public method

Adds a services certificate to the cloud service
public UploadServiceCertificate ( string thumbprint, string password ) : void
thumbprint string The thumbprint of the certificate to get from the store
password string The password used to export the key
return void