CoreService

<back to all web services

GetResource

Resource - CRUD

Returns a single resource by its id

Requires Authentication
Required role:TenantReader
The following routes are available for this service:
GET/api/resources/{Id}Returns a resource
GET/resources/{Id}Returns a resource
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;

public class dtos
{

    /**
    * Returns a single resource by its id
    */
    @Api(Description="Returns a single resource by its id")
    @ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=ResourceDto.class, StatusCode=200)
    public static class GetResource implements IGetSingleRequest, IHasId, IHasTenantName, IGet
    {
        /**
        * The primary key of every config item
        */
        @ApiMember(DataType="string", Description="The primary key of every config item", Format="guid", IsRequired=true, ParameterType="path")
        public UUID id = null;

        @ApiMember(DataType="string", IsRequired=true, ParameterType="header")
        @Validate(Validator="NotEmpty")
        public String tenantName = null;

        /**
        * If true, also soft deleted items will be returned
        */
        @ApiMember(Description="If true, also soft deleted items will be returned", ParameterType="query")
        public Boolean includeDeleted = null;

        @ApiMember(ParameterType="query", Verb="GET")
        public Boolean includeReferencedObjects = null;
        
        public UUID getId() { return id; }
        public GetResource setId(UUID value) { this.id = value; return this; }
        public String getTenantName() { return tenantName; }
        public GetResource setTenantName(String value) { this.tenantName = value; return this; }
        public Boolean isIncludeDeleted() { return includeDeleted; }
        public GetResource setIncludeDeleted(Boolean value) { this.includeDeleted = value; return this; }
        public Boolean isIncludeReferencedObjects() { return includeReferencedObjects; }
        public GetResource setIncludeReferencedObjects(Boolean value) { this.includeReferencedObjects = value; return this; }
    }

    public static class ResourceDto extends ConfigItemDto implements IResourceDto
    {
        /**
        * Free text field to store an external resource id
        */
        public String extId = null;
        /**
        * Free text field to store an external resource type
        */
        public String extType = null;
        /**
        * Free text field to store an external resource name
        */
        public String extName = null;
        /**
        * The id of the tenant
        */
        public UUID tenantId = null;
        /**
        * The id of the parent (ResourceGroup)
        */
        public UUID parentId = null;
        /**
        * The parent (ResourceGroup
        */
        public ConfigItemDto parent = null;
        /**
        * The id of the parent (Deployment
        */
        public UUID deploymentId = null;
        /**
        * The parent (Deployement
        */
        public DeploymentDto deployment = null;
        /**
        * The id of the collection the resource belongs to
        */
        public UUID collectionId = null;
        /**
        * The collection the resource belongs to
        */
        public DeploymentCollectionDto collection = null;
        /**
        * The environment the resourcegroup is deployed in
        */
        public Environments environment = null;
        /**
        * The id of the provider of the resource (e.g. Azure, AWS, other DC provider
        */
        public UUID resourceProviderId = null;
        /**
        * The provider of the resource (e.g. Azure, AWS, other DC provider
        */
        public ResourceProviderDto resourceProvider = null;
        /**
        * State of the resource
        */
        public OperationalStates state = null;
        public IList<VariableDto> variables = null;
        /**
        * Can be used for dc location
        */
        public String location = null;
        /**
        * Last time the resource was seen/updated by a scan/cfgmgmt run etc.
        */
        public Date lastSeen = null;
        /**
        * Last time the resource has been patched successfully
        */
        public Date lastPatchDate = null;
        /**
        * Scheduled time for the next patching window
        */
        public Date nextPatchDate = null;
        /**
        * Time of the last successfull backup
        */
        public Date lastBackupDate = null;
        /**
        * True = scanned (not deployed from dune template), False = deployed from dune with template
        */
        public Boolean isForeign = null;
        /**
        * Is alerting in external monitoring activated
        */
        public Boolean isAlerting = null;
        /**
        * Used to identify external monitoring maintenance/downtime id
        */
        public String alertingDisabledId = null;
        /**
        * Reason why alerting is disabled
        */
        public String alertingDisabledReason = null;
        /**
        * Identifies the resource as vulnerable (security)
        */
        public Boolean isVulnerable = null;
        /**
        * Reason why the resource is vulnerable
        */
        public String vulnerabilityReason = null;
        /**
        * True if resource is in cmdb but missing on provider/infra
        */
        public Boolean isMissingOnProvider = null;
        /**
        * Shows if a resource can be started/stopped
        */
        public Boolean supportsStartStop = null;
        /**
        * The cost for the current month
        */
        public BigDecimal costCurrentMonth = null;
        /**
        * The cost for the last month
        */
        public BigDecimal costLastMonth = null;
        /**
        * The cost currency
        */
        public String costCurrency = null;
        /**
        * Additional generic configs
        */
        public HashMap<String,Object> config = new HashMap<String,Object>();
        public IList<LinkDto> links = null;
        
        public String getExtId() { return extId; }
        public ResourceDto setExtId(String value) { this.extId = value; return this; }
        public String getExtType() { return extType; }
        public ResourceDto setExtType(String value) { this.extType = value; return this; }
        public String getExtName() { return extName; }
        public ResourceDto setExtName(String value) { this.extName = value; return this; }
        public UUID getTenantId() { return tenantId; }
        public ResourceDto setTenantId(UUID value) { this.tenantId = value; return this; }
        public UUID getParentId() { return parentId; }
        public ResourceDto setParentId(UUID value) { this.parentId = value; return this; }
        public ConfigItemDto getParent() { return parent; }
        public ResourceDto setParent(ConfigItemDto value) { this.parent = value; return this; }
        public UUID getDeploymentId() { return deploymentId; }
        public ResourceDto setDeploymentId(UUID value) { this.deploymentId = value; return this; }
        public DeploymentDto getDeployment() { return deployment; }
        public ResourceDto setDeployment(DeploymentDto value) { this.deployment = value; return this; }
        public UUID getCollectionId() { return collectionId; }
        public ResourceDto setCollectionId(UUID value) { this.collectionId = value; return this; }
        public DeploymentCollectionDto getCollection() { return collection; }
        public ResourceDto setCollection(DeploymentCollectionDto value) { this.collection = value; return this; }
        public Environments getEnvironment() { return environment; }
        public ResourceDto setEnvironment(Environments value) { this.environment = value; return this; }
        public UUID getResourceProviderId() { return resourceProviderId; }
        public ResourceDto setResourceProviderId(UUID value) { this.resourceProviderId = value; return this; }
        public ResourceProviderDto getResourceProvider() { return resourceProvider; }
        public ResourceDto setResourceProvider(ResourceProviderDto value) { this.resourceProvider = value; return this; }
        public OperationalStates getState() { return state; }
        public ResourceDto setState(OperationalStates value) { this.state = value; return this; }
        public IList<VariableDto> getVariables() { return variables; }
        public ResourceDto setVariables(IList<VariableDto> value) { this.variables = value; return this; }
        public String getLocation() { return location; }
        public ResourceDto setLocation(String value) { this.location = value; return this; }
        public Date getLastSeen() { return lastSeen; }
        public ResourceDto setLastSeen(Date value) { this.lastSeen = value; return this; }
        public Date getLastPatchDate() { return lastPatchDate; }
        public ResourceDto setLastPatchDate(Date value) { this.lastPatchDate = value; return this; }
        public Date getNextPatchDate() { return nextPatchDate; }
        public ResourceDto setNextPatchDate(Date value) { this.nextPatchDate = value; return this; }
        public Date getLastBackupDate() { return lastBackupDate; }
        public ResourceDto setLastBackupDate(Date value) { this.lastBackupDate = value; return this; }
        public Boolean getIsForeign() { return isForeign; }
        public ResourceDto setIsForeign(Boolean value) { this.isForeign = value; return this; }
        public Boolean getIsAlerting() { return isAlerting; }
        public ResourceDto setIsAlerting(Boolean value) { this.isAlerting = value; return this; }
        public String getAlertingDisabledId() { return alertingDisabledId; }
        public ResourceDto setAlertingDisabledId(String value) { this.alertingDisabledId = value; return this; }
        public String getAlertingDisabledReason() { return alertingDisabledReason; }
        public ResourceDto setAlertingDisabledReason(String value) { this.alertingDisabledReason = value; return this; }
        public Boolean getIsVulnerable() { return isVulnerable; }
        public ResourceDto setIsVulnerable(Boolean value) { this.isVulnerable = value; return this; }
        public String getVulnerabilityReason() { return vulnerabilityReason; }
        public ResourceDto setVulnerabilityReason(String value) { this.vulnerabilityReason = value; return this; }
        public Boolean getIsMissingOnProvider() { return isMissingOnProvider; }
        public ResourceDto setIsMissingOnProvider(Boolean value) { this.isMissingOnProvider = value; return this; }
        public Boolean isSupportsStartStop() { return supportsStartStop; }
        public ResourceDto setSupportsStartStop(Boolean value) { this.supportsStartStop = value; return this; }
        public BigDecimal getCostCurrentMonth() { return costCurrentMonth; }
        public ResourceDto setCostCurrentMonth(BigDecimal value) { this.costCurrentMonth = value; return this; }
        public BigDecimal getCostLastMonth() { return costLastMonth; }
        public ResourceDto setCostLastMonth(BigDecimal value) { this.costLastMonth = value; return this; }
        public String getCostCurrency() { return costCurrency; }
        public ResourceDto setCostCurrency(String value) { this.costCurrency = value; return this; }
        public HashMap<String,Object> getConfig() { return config; }
        public ResourceDto setConfig(HashMap<String,Object> value) { this.config = value; return this; }
        public IList<LinkDto> getLinks() { return links; }
        public ResourceDto setLinks(IList<LinkDto> value) { this.links = value; return this; }
    }

    public static class ConfigItemDto implements IConfigItem
    {
        public UUID id = null;
        public String name = null;
        public String displayName = null;
        public String description = null;
        public ObjectTypes objectType = null;
        public String selfLink = null;
        public IList<TagDto> tags = null;
        public IList<PathItemDto> path = null;
        public Date created = null;
        public String createUser = null;
        public String createUserId = null;
        public Date modified = null;
        public String modifyUser = null;
        public String modifyUserId = null;
        public Boolean isDeleted = null;
        public Date deleted = null;
        public String deleteUser = null;
        public String deleteUserId = null;
        public IList<LinkDto> links = null;
        
        public UUID getId() { return id; }
        public ConfigItemDto setId(UUID value) { this.id = value; return this; }
        public String getName() { return name; }
        public ConfigItemDto setName(String value) { this.name = value; return this; }
        public String getDisplayName() { return displayName; }
        public ConfigItemDto setDisplayName(String value) { this.displayName = value; return this; }
        public String getDescription() { return description; }
        public ConfigItemDto setDescription(String value) { this.description = value; return this; }
        public ObjectTypes getObjectType() { return objectType; }
        public ConfigItemDto setObjectType(ObjectTypes value) { this.objectType = value; return this; }
        public String getSelfLink() { return selfLink; }
        public ConfigItemDto setSelfLink(String value) { this.selfLink = value; return this; }
        public IList<TagDto> getTags() { return tags; }
        public ConfigItemDto setTags(IList<TagDto> value) { this.tags = value; return this; }
        public IList<PathItemDto> getPath() { return path; }
        public ConfigItemDto setPath(IList<PathItemDto> value) { this.path = value; return this; }
        public Date getCreated() { return created; }
        public ConfigItemDto setCreated(Date value) { this.created = value; return this; }
        public String getCreateUser() { return createUser; }
        public ConfigItemDto setCreateUser(String value) { this.createUser = value; return this; }
        public String getCreateUserId() { return createUserId; }
        public ConfigItemDto setCreateUserId(String value) { this.createUserId = value; return this; }
        public Date getModified() { return modified; }
        public ConfigItemDto setModified(Date value) { this.modified = value; return this; }
        public String getModifyUser() { return modifyUser; }
        public ConfigItemDto setModifyUser(String value) { this.modifyUser = value; return this; }
        public String getModifyUserId() { return modifyUserId; }
        public ConfigItemDto setModifyUserId(String value) { this.modifyUserId = value; return this; }
        public Boolean getIsDeleted() { return isDeleted; }
        public ConfigItemDto setIsDeleted(Boolean value) { this.isDeleted = value; return this; }
        public Date getDeleted() { return deleted; }
        public ConfigItemDto setDeleted(Date value) { this.deleted = value; return this; }
        public String getDeleteUser() { return deleteUser; }
        public ConfigItemDto setDeleteUser(String value) { this.deleteUser = value; return this; }
        public String getDeleteUserId() { return deleteUserId; }
        public ConfigItemDto setDeleteUserId(String value) { this.deleteUserId = value; return this; }
        public IList<LinkDto> getLinks() { return links; }
        public ConfigItemDto setLinks(IList<LinkDto> value) { this.links = value; return this; }
    }

    public static enum ObjectTypes
    {
        None,
        ConfigItem,
        Tenant,
        Collection,
        Resource,
        ComputeNode,
        VirtualMachine,
        PhysicalMachine,
        Disk,
        Subnet,
        IpAddress,
        Job,
        JobEvent,
        FreezePeriod,
        ResourceGroup,
        Deployment,
        ResourceGroupTemplate,
        DeploymentTemplate,
        ResourceProvider,
        GenericResource,
        Role,
        Permission,
        User,
        PatchingWindow,
        Update,
        ReportDefinition,
        TimeSeries,
        DataPoint,
        Action,
        ActionAssignment,
        UserNote;
    }

    public static class TagDto
    {
        public String name = null;
        public String value = null;
        public Boolean isProtected = null;
        
        public String getName() { return name; }
        public TagDto setName(String value) { this.name = value; return this; }
        public String getValue() { return value; }
        public TagDto setValue(String value) { this.value = value; return this; }
        public Boolean getIsProtected() { return isProtected; }
        public TagDto setIsProtected(Boolean value) { this.isProtected = value; return this; }
    }

    public static class PathItemDto
    {
        public String label = null;
        public String link = null;
        public ObjectTypes objectType = null;
        public UUID objectId = null;
        
        public String getLabel() { return label; }
        public PathItemDto setLabel(String value) { this.label = value; return this; }
        public String getLink() { return link; }
        public PathItemDto setLink(String value) { this.link = value; return this; }
        public ObjectTypes getObjectType() { return objectType; }
        public PathItemDto setObjectType(ObjectTypes value) { this.objectType = value; return this; }
        public UUID getObjectId() { return objectId; }
        public PathItemDto setObjectId(UUID value) { this.objectId = value; return this; }
    }

    public static class LinkDto
    {
        public String caption = null;
        public String rel = null;
        public String hRef = null;
        public String method = null;
        
        public String getCaption() { return caption; }
        public LinkDto setCaption(String value) { this.caption = value; return this; }
        public String getRel() { return rel; }
        public LinkDto setRel(String value) { this.rel = value; return this; }
        public String getHRef() { return hRef; }
        public LinkDto setHRef(String value) { this.hRef = value; return this; }
        public String getMethod() { return method; }
        public LinkDto setMethod(String value) { this.method = value; return this; }
    }

    public static class DeploymentDto extends ConfigItemDto implements IHasParentDto, IHasTenantId, IEnvironmentSpecific
    {
        /**
        * The operational state of the deployment (Running, Stopped, None, Unknown)
        */
        public OperationalStates operationalState = null;
        /**
        * How many start/stop-capable resources are currently running
        */
        public Integer resourcesRunning = null;
        /**
        * Total number of start/stop-capable resources in this deployment
        */
        public Integer resourcesTotal = null;
        /**
        * Shorter id than the guid which can be used for automation (tenant wide unique) prefixed with a 'd'. E.g. dr36x3
        */
        public String shortId = null;
        /**
        * The user defined part of the name property {userDefined}_{environment}
        */
        public String nameUserDefinedPart = null;
        /**
        * The id of the tenant
        */
        public UUID tenantId = null;
        /**
        * The state of the deployment
        */
        public LifecycleStates state = null;
        /**
        * The environment the deployment is deployed in
        */
        public Environments environment = null;
        /**
        * The id of the template which was used to create the deployment
        */
        public UUID templateId = null;
        /**
        * Shows if a deployment was rolled out through a dune template or not
        */
        public Boolean isTemplateBased = null;
        /**
        * The parameters which were used to create this deployment
        */
        public IList<ParameterDto> parameters = null;
        /**
        * A deployment scoped list of variables used for deployment of resources
        */
        public IList<VariableDto> variables = null;
        /**
        * A snapshot of the varialbs used to create the deployment
        */
        public IList<VariableDto> variablesSnapshot = null;
        /**
        * The id of the parent (collection) of the deployment
        */
        public UUID parentId = null;
        /**
        * The parent (collection) of the deployment
        */
        public ConfigItemDto parent = null;
        /**
        * The Date when the resources got deployed
        */
        public Date validFrom = null;
        /**
        * The Date when the deployment expires and has to be reevaluated
        */
        public Date validUntil = null;
        /**
        * The deployment will never expire
        */
        public Boolean isNeverExpiring = null;
        /**
        * The date, when the deployments resources will receive updates
        */
        public Date nextPatchDate = null;
        /**
        * The default resource provider where the resources are deployed
        */
        public UUID defaultResourceProviderId = null;
        /**
        * Deployments which have issues in Jobs are marked with NeedsAttention
        */
        public Boolean needsAttention = null;
        /**
        * Composition show if all resources in the deployment are dune native, dune foreign or a mix of both
        */
        public ResourceCompositions composition = null;
        /**
        * The monthly cost budget for the whole collection
        */
        public BigDecimal monthlyBudget = null;
        /**
        * Whether to send budget information mails to the collection owners
        */
        public Boolean sendBudgetNotificationMails = null;
        /**
        * A threshold, when to send the first budget warning mail
        */
        public Integer budgetWarningThresholdPercent = null;
        public IList<LinkDto> links = null;
        
        public OperationalStates getOperationalState() { return operationalState; }
        public DeploymentDto setOperationalState(OperationalStates value) { this.operationalState = value; return this; }
        public Integer getResourcesRunning() { return resourcesRunning; }
        public DeploymentDto setResourcesRunning(Integer value) { this.resourcesRunning = value; return this; }
        public Integer getResourcesTotal() { return resourcesTotal; }
        public DeploymentDto setResourcesTotal(Integer value) { this.resourcesTotal = value; return this; }
        public String getShortId() { return shortId; }
        public DeploymentDto setShortId(String value) { this.shortId = value; return this; }
        public String getNameUserDefinedPart() { return nameUserDefinedPart; }
        public DeploymentDto setNameUserDefinedPart(String value) { this.nameUserDefinedPart = value; return this; }
        public UUID getTenantId() { return tenantId; }
        public DeploymentDto setTenantId(UUID value) { this.tenantId = value; return this; }
        public LifecycleStates getState() { return state; }
        public DeploymentDto setState(LifecycleStates value) { this.state = value; return this; }
        public Environments getEnvironment() { return environment; }
        public DeploymentDto setEnvironment(Environments value) { this.environment = value; return this; }
        public UUID getTemplateId() { return templateId; }
        public DeploymentDto setTemplateId(UUID value) { this.templateId = value; return this; }
        public Boolean getIsTemplateBased() { return isTemplateBased; }
        public DeploymentDto setIsTemplateBased(Boolean value) { this.isTemplateBased = value; return this; }
        public IList<ParameterDto> getParameters() { return parameters; }
        public DeploymentDto setParameters(IList<ParameterDto> value) { this.parameters = value; return this; }
        public IList<VariableDto> getVariables() { return variables; }
        public DeploymentDto setVariables(IList<VariableDto> value) { this.variables = value; return this; }
        public IList<VariableDto> getVariablesSnapshot() { return variablesSnapshot; }
        public DeploymentDto setVariablesSnapshot(IList<VariableDto> value) { this.variablesSnapshot = value; return this; }
        public UUID getParentId() { return parentId; }
        public DeploymentDto setParentId(UUID value) { this.parentId = value; return this; }
        public ConfigItemDto getParent() { return parent; }
        public DeploymentDto setParent(ConfigItemDto value) { this.parent = value; return this; }
        public Date getValidFrom() { return validFrom; }
        public DeploymentDto setValidFrom(Date value) { this.validFrom = value; return this; }
        public Date getValidUntil() { return validUntil; }
        public DeploymentDto setValidUntil(Date value) { this.validUntil = value; return this; }
        public Boolean getIsNeverExpiring() { return isNeverExpiring; }
        public DeploymentDto setIsNeverExpiring(Boolean value) { this.isNeverExpiring = value; return this; }
        public Date getNextPatchDate() { return nextPatchDate; }
        public DeploymentDto setNextPatchDate(Date value) { this.nextPatchDate = value; return this; }
        public UUID getDefaultResourceProviderId() { return defaultResourceProviderId; }
        public DeploymentDto setDefaultResourceProviderId(UUID value) { this.defaultResourceProviderId = value; return this; }
        public Boolean isNeedsAttention() { return needsAttention; }
        public DeploymentDto setNeedsAttention(Boolean value) { this.needsAttention = value; return this; }
        public ResourceCompositions getComposition() { return composition; }
        public DeploymentDto setComposition(ResourceCompositions value) { this.composition = value; return this; }
        public BigDecimal getMonthlyBudget() { return monthlyBudget; }
        public DeploymentDto setMonthlyBudget(BigDecimal value) { this.monthlyBudget = value; return this; }
        public Boolean isSendBudgetNotificationMails() { return sendBudgetNotificationMails; }
        public DeploymentDto setSendBudgetNotificationMails(Boolean value) { this.sendBudgetNotificationMails = value; return this; }
        public Integer getBudgetWarningThresholdPercent() { return budgetWarningThresholdPercent; }
        public DeploymentDto setBudgetWarningThresholdPercent(Integer value) { this.budgetWarningThresholdPercent = value; return this; }
        public IList<LinkDto> getLinks() { return links; }
        public DeploymentDto setLinks(IList<LinkDto> value) { this.links = value; return this; }
    }

    public static enum OperationalStates
    {
        None,
        Starting,
        Running,
        Stopping,
        Stopped,
        Restarting,
        Deleting,
        Unknown;
    }

    public static enum LifecycleStates
    {
        New,
        Deploying,
        Deployed,
        Removing,
        Removed,
        Failure,
        Imported;
    }

    public static enum Environments
    {
        Lab,
        Poc,
        Dev,
        Test,
        Int,
        Uat,
        Prod;
    }

    public static class ParameterDto
    {
        public String name = null;
        public String description = null;
        /**
        * Value in form of a json string (e.g. Number = 1234, String = "foo", Boolean = false). Note: string values need extra quotes
        */
        public String value = null;
        /**
        * Optional default value for the frontend. Needs to be in the same format as the value
        */
        @SerializedName("default") public String Default = null;
        /**
        * Optional parameters do not need to have a value. Default -> Optional=false
        */
        public Boolean optional = null;
        /**
        * The data type of the value and default property
        */
        public ParameterValueType type = null;
        public String validation = null;
        
        public String getName() { return name; }
        public ParameterDto setName(String value) { this.name = value; return this; }
        public String getDescription() { return description; }
        public ParameterDto setDescription(String value) { this.description = value; return this; }
        public String getValue() { return value; }
        public ParameterDto setValue(String value) { this.value = value; return this; }
        public String getDefault() { return Default; }
        public ParameterDto setDefault(String value) { this.Default = value; return this; }
        public Boolean isOptional() { return optional; }
        public ParameterDto setOptional(Boolean value) { this.optional = value; return this; }
        public ParameterValueType getType() { return type; }
        public ParameterDto setType(ParameterValueType value) { this.type = value; return this; }
        public String getValidation() { return validation; }
        public ParameterDto setValidation(String value) { this.validation = value; return this; }
    }

    public static enum ParameterValueType
    {
        String,
        Number,
        Boolean,
        SecureString;
    }

    public static class VariableDto
    {
        public String name = null;
        /**
        * Value in form of a json string (e.g. Number = 1234, String = "foo", Boolean = false, List = [1,2,3,4]). Note: string values need extra quotes
        */
        public String value = null;
        /**
        * The data type of the value property
        */
        public ValueDataType type = null;
        public String description = null;
        public Boolean isInherited = null;
        public Environments environment = null;
        
        public String getName() { return name; }
        public VariableDto setName(String value) { this.name = value; return this; }
        public String getValue() { return value; }
        public VariableDto setValue(String value) { this.value = value; return this; }
        public ValueDataType getType() { return type; }
        public VariableDto setType(ValueDataType value) { this.type = value; return this; }
        public String getDescription() { return description; }
        public VariableDto setDescription(String value) { this.description = value; return this; }
        public Boolean getIsInherited() { return isInherited; }
        public VariableDto setIsInherited(Boolean value) { this.isInherited = value; return this; }
        public Environments getEnvironment() { return environment; }
        public VariableDto setEnvironment(Environments value) { this.environment = value; return this; }
    }

    public static enum ValueDataType
    {
        String,
        Number,
        Boolean,
        List;
    }

    public static enum ResourceCompositions
    {
        Native,
        Foreign,
        Mixed;
    }

    public static class DeploymentCollectionDto extends ConfigItemDto implements IHasTenantId
    {
        public UUID tenantId = null;
        public TenantDto tenant = null;
        /**
        * A collection scoped list of variables
        */
        public IList<VariableDto> variables = null;
        /**
        * Defines the collection where scanned but not deployed resources will be stored
        */
        public Boolean isLostAndFound = null;
        /**
        * The monthly cost budget for the whole collection
        */
        public BigDecimal monthlyBudget = null;
        /**
        * Whether to send budget information mails to the collection owners
        */
        public Boolean sendBudgetNotificationMails = null;
        /**
        * A threshold, when to send the first budget warning mail
        */
        public Integer budgetWarningThresholdPercent = null;
        public IList<LinkDto> links = null;
        
        public UUID getTenantId() { return tenantId; }
        public DeploymentCollectionDto setTenantId(UUID value) { this.tenantId = value; return this; }
        public TenantDto getTenant() { return tenant; }
        public DeploymentCollectionDto setTenant(TenantDto value) { this.tenant = value; return this; }
        public IList<VariableDto> getVariables() { return variables; }
        public DeploymentCollectionDto setVariables(IList<VariableDto> value) { this.variables = value; return this; }
        public Boolean getIsLostAndFound() { return isLostAndFound; }
        public DeploymentCollectionDto setIsLostAndFound(Boolean value) { this.isLostAndFound = value; return this; }
        public BigDecimal getMonthlyBudget() { return monthlyBudget; }
        public DeploymentCollectionDto setMonthlyBudget(BigDecimal value) { this.monthlyBudget = value; return this; }
        public Boolean isSendBudgetNotificationMails() { return sendBudgetNotificationMails; }
        public DeploymentCollectionDto setSendBudgetNotificationMails(Boolean value) { this.sendBudgetNotificationMails = value; return this; }
        public Integer getBudgetWarningThresholdPercent() { return budgetWarningThresholdPercent; }
        public DeploymentCollectionDto setBudgetWarningThresholdPercent(Integer value) { this.budgetWarningThresholdPercent = value; return this; }
        public IList<LinkDto> getLinks() { return links; }
        public DeploymentCollectionDto setLinks(IList<LinkDto> value) { this.links = value; return this; }
    }

    public static class TenantDto extends ConfigItemDto
    {
        /**
        * Variables defined on tenant level
        */
        public IList<VariableDto> variables = null;
        /**
        * Allowed email domains used for authentication
        */
        public IList<String> allowedMailDomains = null;
        /**
        * List of licensed modules for this tenant
        */
        public IList<String> licensedModules = null;
        /**
        * Amount of days until a Deployment expires
        */
        public Short defaultDeploymentLifetimeDays = null;
        /**
        * Max amount of days until a Deployment expires
        */
        public Short maxDeploymentLifetimeDays = null;
        /**
        * Amount of days without patching until a unpatched warning is shown
        */
        public Short systemUnpatchedWarningDays = null;
        /**
        * Amount of hours without backup until a backup missing warning is shown
        */
        public Short systemBackupMissingWarningHours = null;
        /**
        * Amount of days until a vulnerable resource is getting stopped
        */
        public Short stopVulnerableResourceAfterDays = null;
        /**
        * Amount of days before deployment expiration, which triggers the expiration warning
        */
        public Short deploymentExpirationWarningDays = null;
        /**
        * Amount of days the patch notification is sent out prior to the patch date
        */
        public Short patchNotificationDays = null;
        /**
        * Use a pool with your own hostnames (true) or let the hostname be auto generated (false)
        */
        public Boolean useCustomHostnames = null;
        /**
        * After how many days inactive vulnerabilities will be purged from database
        */
        public Short removeInactiveVulnerabilitiesAfterDays = null;
        public IList<LinkDto> links = null;
        
        public IList<VariableDto> getVariables() { return variables; }
        public TenantDto setVariables(IList<VariableDto> value) { this.variables = value; return this; }
        public IList<String> getAllowedMailDomains() { return allowedMailDomains; }
        public TenantDto setAllowedMailDomains(IList<String> value) { this.allowedMailDomains = value; return this; }
        public IList<String> getLicensedModules() { return licensedModules; }
        public TenantDto setLicensedModules(IList<String> value) { this.licensedModules = value; return this; }
        public Short getDefaultDeploymentLifetimeDays() { return defaultDeploymentLifetimeDays; }
        public TenantDto setDefaultDeploymentLifetimeDays(Short value) { this.defaultDeploymentLifetimeDays = value; return this; }
        public Short getMaxDeploymentLifetimeDays() { return maxDeploymentLifetimeDays; }
        public TenantDto setMaxDeploymentLifetimeDays(Short value) { this.maxDeploymentLifetimeDays = value; return this; }
        public Short getSystemUnpatchedWarningDays() { return systemUnpatchedWarningDays; }
        public TenantDto setSystemUnpatchedWarningDays(Short value) { this.systemUnpatchedWarningDays = value; return this; }
        public Short getSystemBackupMissingWarningHours() { return systemBackupMissingWarningHours; }
        public TenantDto setSystemBackupMissingWarningHours(Short value) { this.systemBackupMissingWarningHours = value; return this; }
        public Short getStopVulnerableResourceAfterDays() { return stopVulnerableResourceAfterDays; }
        public TenantDto setStopVulnerableResourceAfterDays(Short value) { this.stopVulnerableResourceAfterDays = value; return this; }
        public Short getDeploymentExpirationWarningDays() { return deploymentExpirationWarningDays; }
        public TenantDto setDeploymentExpirationWarningDays(Short value) { this.deploymentExpirationWarningDays = value; return this; }
        public Short getPatchNotificationDays() { return patchNotificationDays; }
        public TenantDto setPatchNotificationDays(Short value) { this.patchNotificationDays = value; return this; }
        public Boolean isUseCustomHostnames() { return useCustomHostnames; }
        public TenantDto setUseCustomHostnames(Boolean value) { this.useCustomHostnames = value; return this; }
        public Short getRemoveInactiveVulnerabilitiesAfterDays() { return removeInactiveVulnerabilitiesAfterDays; }
        public TenantDto setRemoveInactiveVulnerabilitiesAfterDays(Short value) { this.removeInactiveVulnerabilitiesAfterDays = value; return this; }
        public IList<LinkDto> getLinks() { return links; }
        public TenantDto setLinks(IList<LinkDto> value) { this.links = value; return this; }
    }

    public static class ResourceProviderDto extends ConfigItemDto implements IHasTenantId
    {
        public UUID tenantId = null;
        /**
        * If environment cannot be detected while scanning, default environment will be used
        */
        public Environments defaultEnvironment = null;
        /**
        * List off all allowed environments for this resource provider
        */
        public IList<Environments> allowedEnvironments = null;
        /**
        * Defines the provider type (e.g. Azure, Aws)
        */
        public ResourceProviderTypes type = null;
        /**
        * Additional generic data which varies depending on ProviderType
        */
        public IList<ProviderConfigEntryDto> config = null;
        /**
        * Disabled ResourceProviders cannot be selected for new deployments
        */
        public Boolean isDisabled = null;
        /**
        * Shows if a ResourceProvider has been initialized and can accept deployments (resources)
        */
        public Boolean isReadyForDeployments = null;
        /**
        * The cost for the current month
        */
        public BigDecimal costCurrentMonth = null;
        /**
        * The cost for the last month
        */
        public BigDecimal costLastMonth = null;
        /**
        * The cost currency
        */
        public String costCurrency = null;
        
        public UUID getTenantId() { return tenantId; }
        public ResourceProviderDto setTenantId(UUID value) { this.tenantId = value; return this; }
        public Environments getDefaultEnvironment() { return defaultEnvironment; }
        public ResourceProviderDto setDefaultEnvironment(Environments value) { this.defaultEnvironment = value; return this; }
        public IList<Environments> getAllowedEnvironments() { return allowedEnvironments; }
        public ResourceProviderDto setAllowedEnvironments(IList<Environments> value) { this.allowedEnvironments = value; return this; }
        public ResourceProviderTypes getType() { return type; }
        public ResourceProviderDto setType(ResourceProviderTypes value) { this.type = value; return this; }
        public IList<ProviderConfigEntryDto> getConfig() { return config; }
        public ResourceProviderDto setConfig(IList<ProviderConfigEntryDto> value) { this.config = value; return this; }
        public Boolean getIsDisabled() { return isDisabled; }
        public ResourceProviderDto setIsDisabled(Boolean value) { this.isDisabled = value; return this; }
        public Boolean getIsReadyForDeployments() { return isReadyForDeployments; }
        public ResourceProviderDto setIsReadyForDeployments(Boolean value) { this.isReadyForDeployments = value; return this; }
        public BigDecimal getCostCurrentMonth() { return costCurrentMonth; }
        public ResourceProviderDto setCostCurrentMonth(BigDecimal value) { this.costCurrentMonth = value; return this; }
        public BigDecimal getCostLastMonth() { return costLastMonth; }
        public ResourceProviderDto setCostLastMonth(BigDecimal value) { this.costLastMonth = value; return this; }
        public String getCostCurrency() { return costCurrency; }
        public ResourceProviderDto setCostCurrency(String value) { this.costCurrency = value; return this; }
    }

    public static enum ResourceProviderTypes
    {
        Azure,
        AmazonWebServices,
        GoogleCloudPlatform,
        ActiveDirectoryServices,
        DomainNameSystem,
        SwisscomESC,
        AzureKeyVault;
    }

    public static class ProviderConfigEntryDto
    {
        public String name = null;
        public String value = null;
        public Boolean isSecure = null;
        
        public String getName() { return name; }
        public ProviderConfigEntryDto setName(String value) { this.name = value; return this; }
        public String getValue() { return value; }
        public ProviderConfigEntryDto setValue(String value) { this.value = value; return this; }
        public Boolean getIsSecure() { return isSecure; }
        public ProviderConfigEntryDto setIsSecure(Boolean value) { this.isSecure = value; return this; }
    }

}

Java GetResource DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /api/resources/{Id} HTTP/1.1 
Host: core.starburst.svc 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"extId":"String","extType":"String","extName":"String","tenantId":"00000000-0000-0000-0000-000000000000","parentId":"00000000-0000-0000-0000-000000000000","parent":{"id":"00000000-0000-0000-0000-000000000000","name":"String","displayName":"String","description":"String","objectType":"None","selfLink":"String","tags":null,"path":null,"created":"0001-01-01T00:00:00.0000000Z","createUser":"String","createUserId":"String","modified":"0001-01-01T00:00:00.0000000Z","modifyUser":"String","modifyUserId":"String","isDeleted":false,"deleted":"0001-01-01T00:00:00.0000000Z","deleteUser":"String","deleteUserId":"String","links":null},"deploymentId":"00000000-0000-0000-0000-000000000000","deployment":{"operationalState":"None","resourcesRunning":0,"resourcesTotal":0,"shortId":"String","nameUserDefinedPart":"String","tenantId":"00000000-0000-0000-0000-000000000000","state":"New","environment":"Lab","templateId":"00000000-0000-0000-0000-000000000000","isTemplateBased":true,"parameters":null,"variables":null,"variablesSnapshot":null,"parentId":"00000000-0000-0000-0000-000000000000","parent":{"id":"00000000-0000-0000-0000-000000000000","name":"String","displayName":"String","description":"String","objectType":"None","selfLink":"String","tags":null,"path":null,"created":"0001-01-01T00:00:00.0000000Z","createUser":"String","createUserId":"String","modified":"0001-01-01T00:00:00.0000000Z","modifyUser":"String","modifyUserId":"String","isDeleted":false,"deleted":"0001-01-01T00:00:00.0000000Z","deleteUser":"String","deleteUserId":"String","links":null},"validFrom":"0001-01-01T00:00:00.0000000Z","validUntil":"0001-01-01T00:00:00.0000000Z","isNeverExpiring":false,"nextPatchDate":"0001-01-01T00:00:00.0000000Z","defaultResourceProviderId":"00000000-0000-0000-0000-000000000000","needsAttention":false,"composition":"Native","monthlyBudget":0,"sendBudgetNotificationMails":false,"budgetWarningThresholdPercent":0,"links":[{"caption":"Index","rel":"index","hRef":"/deployments/","method":"GET"},{"caption":"Collection","rel":"up","hRef":"/collections/00000000-0000-0000-0000-000000000000","method":"GET"},{"caption":"Resourcegroups","rel":"down","hRef":"/resourcegroups?parentId=00000000-0000-0000-0000-000000000000","method":"GET"}],"id":"00000000-0000-0000-0000-000000000000","name":"String","displayName":"String","description":"String","objectType":"None","selfLink":"String","tags":null,"path":null,"created":"0001-01-01T00:00:00.0000000Z","createUser":"String","createUserId":"String","modified":"0001-01-01T00:00:00.0000000Z","modifyUser":"String","modifyUserId":"String","isDeleted":false,"deleted":"0001-01-01T00:00:00.0000000Z","deleteUser":"String","deleteUserId":"String"},"collectionId":"00000000-0000-0000-0000-000000000000","collection":{"tenantId":"00000000-0000-0000-0000-000000000000","tenant":{"variables":null,"allowedMailDomains":null,"licensedModules":null,"defaultDeploymentLifetimeDays":0,"maxDeploymentLifetimeDays":0,"systemUnpatchedWarningDays":0,"systemBackupMissingWarningHours":0,"stopVulnerableResourceAfterDays":0,"deploymentExpirationWarningDays":0,"patchNotificationDays":0,"useCustomHostnames":false,"removeInactiveVulnerabilitiesAfterDays":0,"links":[{"caption":"Collections","rel":"down","hRef":"/collections/","method":"GET"}],"id":"00000000-0000-0000-0000-000000000000","name":"String","displayName":"String","description":"String","objectType":"None","selfLink":"String","tags":null,"path":null,"created":"0001-01-01T00:00:00.0000000Z","createUser":"String","createUserId":"String","modified":"0001-01-01T00:00:00.0000000Z","modifyUser":"String","modifyUserId":"String","isDeleted":false,"deleted":"0001-01-01T00:00:00.0000000Z","deleteUser":"String","deleteUserId":"String"},"variables":null,"isLostAndFound":false,"monthlyBudget":0,"sendBudgetNotificationMails":false,"budgetWarningThresholdPercent":0,"links":[{"caption":"Index","rel":"up","hRef":"/collections/","method":"GET"},{"caption":"Deployments","rel":"down","hRef":"/deployments?parentId=00000000-0000-0000-0000-000000000000","method":"GET"}],"id":"00000000-0000-0000-0000-000000000000","name":"String","displayName":"String","description":"String","objectType":"None","selfLink":"String","tags":null,"path":null,"created":"0001-01-01T00:00:00.0000000Z","createUser":"String","createUserId":"String","modified":"0001-01-01T00:00:00.0000000Z","modifyUser":"String","modifyUserId":"String","isDeleted":false,"deleted":"0001-01-01T00:00:00.0000000Z","deleteUser":"String","deleteUserId":"String"},"environment":"Lab","resourceProviderId":"00000000-0000-0000-0000-000000000000","resourceProvider":{"tenantId":"00000000-0000-0000-0000-000000000000","defaultEnvironment":"Lab","allowedEnvironments":null,"type":"Azure","config":null,"isDisabled":false,"isReadyForDeployments":false,"costCurrentMonth":0,"costLastMonth":0,"costCurrency":"String","id":"00000000-0000-0000-0000-000000000000","name":"String","displayName":"String","description":"String","objectType":"None","selfLink":"String","tags":null,"path":null,"created":"0001-01-01T00:00:00.0000000Z","createUser":"String","createUserId":"String","modified":"0001-01-01T00:00:00.0000000Z","modifyUser":"String","modifyUserId":"String","isDeleted":false,"deleted":"0001-01-01T00:00:00.0000000Z","deleteUser":"String","deleteUserId":"String","links":null},"state":"None","variables":null,"location":"String","lastSeen":"0001-01-01T00:00:00.0000000Z","lastPatchDate":"0001-01-01T00:00:00.0000000Z","nextPatchDate":"0001-01-01T00:00:00.0000000Z","lastBackupDate":"0001-01-01T00:00:00.0000000Z","isForeign":false,"isAlerting":false,"alertingDisabledId":"String","alertingDisabledReason":"String","isVulnerable":false,"vulnerabilityReason":"String","isMissingOnProvider":false,"supportsStartStop":false,"costCurrentMonth":0,"costLastMonth":0,"costCurrency":"String","config":{"String":{}},"links":[{"caption":"Index","rel":"index","hRef":"/resources/","method":"GET"},{"caption":"ResourceGroup","rel":"up","hRef":"/resourcegroups/00000000-0000-0000-0000-000000000000","method":"GET"},{"caption":"Deployment","rel":"up","hRef":"/deployments/00000000-0000-0000-0000-000000000000","method":"GET"}],"id":"00000000-0000-0000-0000-000000000000","name":"String","displayName":"String","description":"String","objectType":"None","selfLink":"String","tags":null,"path":null,"created":"0001-01-01T00:00:00.0000000Z","createUser":"String","createUserId":"String","modified":"0001-01-01T00:00:00.0000000Z","modifyUser":"String","modifyUserId":"String","isDeleted":false,"deleted":"0001-01-01T00:00:00.0000000Z","deleteUser":"String","deleteUserId":"String"}