C# Класс Elastacloud.AzureManagement.Fluent.Clients.ServiceClient

Наследование: IServiceClient
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
BuildCertGenerator ( string name, string password ) : CertificateGenerator

Описание методов

CreateNewCloudService() публичный Метод

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
Результат void

CreateServiceCertificateAndAddRemoteDesktop() публичный Метод

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
Результат Elastacloud.AzureManagement.Fluent.Services.Classes.ServiceCertificate

CreateServiceCertificateExportToFileSystem() публичный Метод

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
Результат Elastacloud.AzureManagement.Fluent.Helpers.CertificateGenerator

CreateServiceCertificateExportToStorage() публичный Метод

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
Результат Elastacloud.AzureManagement.Fluent.Helpers.CertificateGenerator

DeleteCloudService() публичный Метод

Used to delete the current cloud service
public DeleteCloudService ( ) : void
Результат void

DeleteCloudServiceAndDeployment() публичный Метод

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
Результат void

DeleteDeployment() публичный Метод

Used to delete a deployment in a respective slot
public DeleteDeployment ( DeploymentSlot slot = DeploymentSlot.Production ) : void
slot DeploymentSlot Either production or staging
Результат void

DeployServiceToAzure() публичный Метод

Used to deploy a cloud service package to Azure
public DeployServiceToAzure ( PaaSDeploymentSettings settings ) : void
settings Elastacloud.AzureManagement.Fluent.Clients.Interfaces.PaaSDeploymentSettings
Результат void

GetRoleInstances() публичный Метод

Gets the status of all role instances in a deployment
public GetRoleInstances ( ) : IEnumerable
Результат IEnumerable

ServiceClient() публичный Метод

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
Результат System

Start() публичный Метод

Starts all of the roles within a cloud service
public Start ( ) : void
Результат void

Stop() публичный Метод

Stops all of the roles within a cloud service
public Stop ( ) : void
Результат void

UpdateRoleInstanceCount() публичный Метод

Updates a role instance count within a cloud services
public UpdateRoleInstanceCount ( string roleName, int instanceCount ) : void
roleName string
instanceCount int
Результат void

UploadServiceCertificate() публичный Метод

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
Результат void

UploadServiceCertificate() публичный Метод

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
Результат void