C# Class DD.CBU.CaasDeploy.Library.Utilities.ResourceDeployer

Helper class to deploy or delete a resource.
Mostra file Open project: DimensionDataCBUSydney/CaaSDeploy Class Usage Examples

Public Methods

Method Description
DeleteAndWait ( string caasId ) : Task

Deletes a resource by CaaS identifier and waits.

DeployAndWait ( Newtonsoft.Json.Linq.JObject resourceDefinition ) : Task

Deploys the supplied resource and waits.

Get ( string caasId ) : Task

Gets a resource by CaaS identifier.

ResourceDeployer ( DD.CBU.CaasDeploy.Library.Contracts.RuntimeContext runtimeContext, string resourceId, ResourceType resourceType ) : System

Initializes a new instance of the ResourceDeployer class.

Private Methods

Method Description
DeleteExistingResource ( string caasId ) : Task

Deletes a resource by CaaS identifier.

DeployNewResource ( Newtonsoft.Json.Linq.JObject resourceDefinition ) : Task

Deploys the supplied resource.

GetApiUrl ( string relativeUrl ) : string

Gets the absolute API URL.

GetResourceByIdentifiers ( string ids ) : Task>

Gets multiple resources by identifiers.

GetResourceIdentifiers ( Newtonsoft.Json.Linq.JObject resourceDefinition ) : string[]

Retrieves the values from the template resource definition that can be used to uniquely identify an already deployed resource, in the order specified in the ListUrl parameters.

RemovePropertiesUnsupportedForEdit ( Newtonsoft.Json.Linq.JObject resourceDefinition ) : void

Removes the properties unsupported for edit.

UpdateExistingResource ( string existingId, Newtonsoft.Json.Linq.JObject resourceDefinition ) : System.Threading.Tasks.Task

Updates an existing resource.

WaitForDelete ( string caasId ) : System.Threading.Tasks.Task

Waits for a delete operation.

WaitForDeploy ( string caasId ) : Task

Waits for deployment operation.

Method Details

DeleteAndWait() public method

Deletes a resource by CaaS identifier and waits.
public DeleteAndWait ( string caasId ) : Task
caasId string The CaaS identifier.
return Task

DeployAndWait() public method

Deploys the supplied resource and waits.
public DeployAndWait ( Newtonsoft.Json.Linq.JObject resourceDefinition ) : Task
resourceDefinition Newtonsoft.Json.Linq.JObject The resource definition.
return Task

Get() public method

Gets a resource by CaaS identifier.
public Get ( string caasId ) : Task
caasId string The CaaS identifier.
return Task

ResourceDeployer() public method

Initializes a new instance of the ResourceDeployer class.
public ResourceDeployer ( DD.CBU.CaasDeploy.Library.Contracts.RuntimeContext runtimeContext, string resourceId, ResourceType resourceType ) : System
runtimeContext DD.CBU.CaasDeploy.Library.Contracts.RuntimeContext The runtime context.
resourceId string The resource identifier.
resourceType ResourceType Type of the resource.
return System