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

A client used to manage all aspects of a windows azure website
Inheritance: IWebsiteClient
Show file Open project: azurecoder/fluent-management Class Usage Examples

Public Methods

Method Description
Create ( Website website, ScmType scm = ScmType.LocalGit ) : void

Creates a default website with nothing deployed

CreateFromBitBucket ( Website website, GitDetails gitDetails ) : void

As above but using BitBucket instead

CreateFromGithub ( Website website, GitDetails gitDetails ) : void

Creates a website given github credentials

Delete ( ) : void

Deletes a website with the current context

GetWebsiteMetricsPerInterval ( System.TimeSpan span ) : List

Gets the website metrics in the requested interval backwards from datetime.now

List ( ) : List

Returns a list of websites

Restart ( ) : void

Restarts the website from a stopped state

Stop ( ) : void

Stops the website if it is currently running

Update ( ) : void

Updates the config with the current compute config

WebsiteClient ( string subscriptionId, X509Certificate2 certificate, string siteName = null ) : System

Used to construct a windows azure website client

Private Methods

Method Description
GetWebsiteIfExists ( ) : Website
SetScalePotential ( Website website ) : void
ValidateWebSpace ( string webSpace ) : void

Method Details

Create() public method

Creates a default website with nothing deployed
public Create ( Website website, ScmType scm = ScmType.LocalGit ) : void
website Elastacloud.AzureManagement.Fluent.Types.Websites.Website the website which will be created
scm ScmType
return void

CreateFromBitBucket() public method

As above but using BitBucket instead
public CreateFromBitBucket ( Website website, GitDetails gitDetails ) : void
website Elastacloud.AzureManagement.Fluent.Types.Websites.Website
gitDetails Elastacloud.AzureManagement.Fluent.Types.Websites.GitDetails
return void

CreateFromGithub() public method

Creates a website given github credentials
public CreateFromGithub ( Website website, GitDetails gitDetails ) : void
website Elastacloud.AzureManagement.Fluent.Types.Websites.Website
gitDetails Elastacloud.AzureManagement.Fluent.Types.Websites.GitDetails the details of the github repo
return void

Delete() public method

Deletes a website with the current context
public Delete ( ) : void
return void

GetWebsiteMetricsPerInterval() public method

Gets the website metrics in the requested interval backwards from datetime.now
public GetWebsiteMetricsPerInterval ( System.TimeSpan span ) : List
span System.TimeSpan
return List

List() public method

Returns a list of websites
public List ( ) : List
return List

Restart() public method

Restarts the website from a stopped state
public Restart ( ) : void
return void

Stop() public method

Stops the website if it is currently running
public Stop ( ) : void
return void

Update() public method

Updates the config with the current compute config
public Update ( ) : void
return void

WebsiteClient() public method

Used to construct a windows azure website client
public WebsiteClient ( string subscriptionId, X509Certificate2 certificate, string siteName = null ) : System
subscriptionId string the subscription id
certificate System.Security.Cryptography.X509Certificates.X509Certificate2 The management certificate
siteName string The sitename used to get a context for
return System