Edit

Share via


ManagementRestClient class

Base class that should be used (derived from) to make requests to VSS REST apis

Extends

Constructors

ManagementRestClient(IVssRestClientOptions)

Methods

createBillingSnapshot(MeterUsage)

During multi-org billing computation in primary scale unit(EUS21), this API is used to create billing snapshot for a specific org. Primary scale unit will call this API for each org in different scsle units to create billing snapshot. Data will be stored in the org specific partition DB -> billing snapshot table. This is needed as customers will fetch billing data from their org specific partition DB.

createBillingSnapshot2(MeterUsageForPlan, Plan)

During multi-org billing computation in primary scale unit(EUS21), this API is used to create billing snapshot for a specific org. Primary scale unit will call this API for each org in different scsle units to create billing snapshot. Data will be stored in the org specific partition DB -> billing snapshot table. This is needed as customers will fetch billing data from their org specific partition DB.

getBillableCommitterDetails(Date)

Get all billable committers details, including those not matched with a VSID.

getBillableCommitterDetails2(Plan, Date)

Get all billable committers details, including those not matched with a VSID.

getEstimatedBillablePushersDetailsForOrg()

Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization.

getEstimatedBillablePushersDetailsForOrg2()

Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization.

getEstimatedBillablePushersDetailsForProject(string)

Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this project.

getEstimatedBillablePushersDetailsForProject2(string)

Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this project.

getEstimatedOrgBillablePushers()

Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this organization.

getEstimatedOrgBillablePushers2()

Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this organization.

getEstimatedProjectBillablePushers(string)

Estimate the number of committers that would be added to the customer's usage if Advanced Security was enabled for this project.

getEstimatedProjectBillablePushers2(string)

Estimate the number of committers that would be added to the customer's usage if Advanced Security was enabled for this project.

getEstimatedRepoBillableCommitters(string, string)

Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this repository.

getEstimatedRepoBillableCommitters2(string, string)

Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this repository.

getEstimatedRepoBillableCommittersDetails2(string, string)

Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this repository.

getEstimatedRepoBillablePushersDetails(string, string)

Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this repository.

getLastMeterUsage()
getLastMeterUsage2(Plan)
getMeterUsage(Date)

Get commiters used when calculating billing information.

getMeterUsage2(Plan, Date)

Get commiters used when calculating billing information.

getOrgEnablementStatus(boolean)

Get the current status of Advanced Security for the organization

getOrgEnablementStatus2(boolean)

Get the current status of Advanced Security for the organization

getProjectEnablementStatus(string, boolean)

Get the current status of Advanced Security for a project

getProjectEnablementStatus2(string, boolean)

Get the current status of Advanced Security for a project

getRepoEnablementStatus(string, string, boolean)

Determine if Advanced Security is enabled for a repository

getRepoEnablementStatus2(string, string, boolean)

Determine if Advanced Security is enabled for a repository

updateOrgEnablementStatus(AdvSecEnablementSettingsUpdate)

Update the status of Advanced Security for the organization

updateOrgEnablementStatus2(OrgEnablementSettings)

Update the status of Advanced Security for the organization

updateProjectEnablementStatus(AdvSecEnablementSettingsUpdate, string)

Update the status of Advanced Security for the project

updateProjectEnablementStatus2(ProjectEnablementSettings, string)

Update the status of Advanced Security for the project

updateRepoAdvSecEnablementStatus(AdvSecEnablementStatusUpdate, string, string)

Update the enablement of Advanced Security for a repository

updateRepoAdvSecEnablementStatus2(RepoEnablementSettings, string, string)

Update the enablement of Advanced Security for a repository

Constructor Details

ManagementRestClient(IVssRestClientOptions)

new ManagementRestClient(options: IVssRestClientOptions)

Parameters

Method Details

createBillingSnapshot(MeterUsage)

During multi-org billing computation in primary scale unit(EUS21), this API is used to create billing snapshot for a specific org. Primary scale unit will call this API for each org in different scsle units to create billing snapshot. Data will be stored in the org specific partition DB -> billing snapshot table. This is needed as customers will fetch billing data from their org specific partition DB.

function createBillingSnapshot(meterUsage: MeterUsage): Promise<void>

Parameters

meterUsage
MeterUsage

Returns

Promise<void>

createBillingSnapshot2(MeterUsageForPlan, Plan)

During multi-org billing computation in primary scale unit(EUS21), this API is used to create billing snapshot for a specific org. Primary scale unit will call this API for each org in different scsle units to create billing snapshot. Data will be stored in the org specific partition DB -> billing snapshot table. This is needed as customers will fetch billing data from their org specific partition DB.

function createBillingSnapshot2(meterUsage: MeterUsageForPlan, plan: Plan): Promise<void>

Parameters

meterUsage
MeterUsageForPlan
plan
Plan

Returns

Promise<void>

getBillableCommitterDetails(Date)

Get all billable committers details, including those not matched with a VSID.

function getBillableCommitterDetails(billingDate?: Date): Promise<BillableCommitterDetails[]>

Parameters

billingDate

Date

The date to query, or if not provided, today

Returns

getBillableCommitterDetails2(Plan, Date)

Get all billable committers details, including those not matched with a VSID.

function getBillableCommitterDetails2(plan: Plan, billingDate?: Date): Promise<BillableCommitterDetails[]>

Parameters

plan
Plan

The plan to query. Plans supported: CodeSecurity and SecretProtection. This is a mandatory parameter.

billingDate

Date

The date to query, or if not provided, today

Returns

getEstimatedBillablePushersDetailsForOrg()

Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization.

function getEstimatedBillablePushersDetailsForOrg(): Promise<BilledCommitter[]>

Returns

Promise<BilledCommitter[]>

getEstimatedBillablePushersDetailsForOrg2()

Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization.

function getEstimatedBillablePushersDetailsForOrg2(): Promise<MeterUsageEstimate>

Returns

getEstimatedBillablePushersDetailsForProject(string)

Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this project.

function getEstimatedBillablePushersDetailsForProject(project: string): Promise<BilledCommitter[]>

Parameters

project

string

Project ID or project name

Returns

Promise<BilledCommitter[]>

getEstimatedBillablePushersDetailsForProject2(string)

Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this project.

function getEstimatedBillablePushersDetailsForProject2(project: string): Promise<MeterUsageEstimate>

Parameters

project

string

Project ID or project name

Returns

getEstimatedOrgBillablePushers()

Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this organization.

function getEstimatedOrgBillablePushers(): Promise<string[]>

Returns

Promise<string[]>

getEstimatedOrgBillablePushers2()

Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this organization.

function getEstimatedOrgBillablePushers2(): Promise<string[]>

Returns

Promise<string[]>

getEstimatedProjectBillablePushers(string)

Estimate the number of committers that would be added to the customer's usage if Advanced Security was enabled for this project.

function getEstimatedProjectBillablePushers(project: string): Promise<string[]>

Parameters

project

string

Project ID or project name

Returns

Promise<string[]>

getEstimatedProjectBillablePushers2(string)

Estimate the number of committers that would be added to the customer's usage if Advanced Security was enabled for this project.

function getEstimatedProjectBillablePushers2(project: string): Promise<string[]>

Parameters

project

string

Project ID or project name

Returns

Promise<string[]>

getEstimatedRepoBillableCommitters(string, string)

Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this repository.

function getEstimatedRepoBillableCommitters(project: string, repository: string): Promise<string[]>

Parameters

project

string

Project ID or project name

repository

string

The name or ID of the repository

Returns

Promise<string[]>

getEstimatedRepoBillableCommitters2(string, string)

Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this repository.

function getEstimatedRepoBillableCommitters2(project: string, repository: string): Promise<string[]>

Parameters

project

string

Project ID or project name

repository

string

The name or ID of the repository

Returns

Promise<string[]>

getEstimatedRepoBillableCommittersDetails2(string, string)

Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this repository.

function getEstimatedRepoBillableCommittersDetails2(project: string, repository: string): Promise<MeterUsageEstimate>

Parameters

project

string

Project ID or project name

repository

string

Returns

getEstimatedRepoBillablePushersDetails(string, string)

Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this repository.

function getEstimatedRepoBillablePushersDetails(project: string, repository: string): Promise<BilledCommitter[]>

Parameters

project

string

Project ID or project name

repository

string

Returns

Promise<BilledCommitter[]>

getLastMeterUsage()

function getLastMeterUsage(): Promise<MeterUsage>

Returns

Promise<MeterUsage>

getLastMeterUsage2(Plan)

function getLastMeterUsage2(plan: Plan): Promise<MeterUsageForPlan>

Parameters

plan
Plan

Returns

getMeterUsage(Date)

Get commiters used when calculating billing information.

function getMeterUsage(billingDate?: Date): Promise<MeterUsage>

Parameters

billingDate

Date

The date to query, or if not provided, today

Returns

Promise<MeterUsage>

getMeterUsage2(Plan, Date)

Get commiters used when calculating billing information.

function getMeterUsage2(plan: Plan, billingDate?: Date): Promise<MeterUsageForPlan>

Parameters

plan
Plan

The plan to query. Plans supported: CodeSecurity and SecretProtection. This is a mandatory parameter.

billingDate

Date

The date to query, or if not provided, today

Returns

getOrgEnablementStatus(boolean)

Get the current status of Advanced Security for the organization

function getOrgEnablementStatus(includeAllProperties?: boolean): Promise<AdvSecEnablementSettings>

Parameters

includeAllProperties

boolean

When true, also determine if pushes are blocked if they contain secrets

Returns

getOrgEnablementStatus2(boolean)

Get the current status of Advanced Security for the organization

function getOrgEnablementStatus2(includeAllProperties?: boolean): Promise<OrgEnablementSettings>

Parameters

includeAllProperties

boolean

When true, also determine if pushes are blocked if they contain secrets

Returns

getProjectEnablementStatus(string, boolean)

Get the current status of Advanced Security for a project

function getProjectEnablementStatus(project: string, includeAllProperties?: boolean): Promise<AdvSecEnablementSettings>

Parameters

project

string

Project ID or project name

includeAllProperties

boolean

When true, also determine if pushes are blocked if they contain secrets

Returns

getProjectEnablementStatus2(string, boolean)

Get the current status of Advanced Security for a project

function getProjectEnablementStatus2(project: string, includeAllProperties?: boolean): Promise<ProjectEnablementSettings>

Parameters

project

string

Project ID or project name

includeAllProperties

boolean

When true, also determine if pushes are blocked if they contain secrets

Returns

getRepoEnablementStatus(string, string, boolean)

Determine if Advanced Security is enabled for a repository

function getRepoEnablementStatus(project: string, repository: string, includeAllProperties?: boolean): Promise<AdvSecEnablementStatus>

Parameters

project

string

Project ID or project name

repository

string

The name or ID of the repository

includeAllProperties

boolean

When true, will also determine if pushes are blocked when secrets are detected

Returns

getRepoEnablementStatus2(string, string, boolean)

Determine if Advanced Security is enabled for a repository

function getRepoEnablementStatus2(project: string, repository: string, includeAllProperties?: boolean): Promise<RepoEnablementSettings>

Parameters

project

string

Project ID or project name

repository

string

The name or ID of the repository

includeAllProperties

boolean

When true, will also determine if pushes are blocked when secrets are detected

Returns

updateOrgEnablementStatus(AdvSecEnablementSettingsUpdate)

Update the status of Advanced Security for the organization

function updateOrgEnablementStatus(savedAdvSecEnablementStatus: AdvSecEnablementSettingsUpdate): Promise<void>

Parameters

savedAdvSecEnablementStatus
AdvSecEnablementSettingsUpdate

The new status

Returns

Promise<void>

updateOrgEnablementStatus2(OrgEnablementSettings)

Update the status of Advanced Security for the organization

function updateOrgEnablementStatus2(savedAdvSecEnablementStatus: OrgEnablementSettings): Promise<void>

Parameters

savedAdvSecEnablementStatus
OrgEnablementSettings

The new status

Returns

Promise<void>

updateProjectEnablementStatus(AdvSecEnablementSettingsUpdate, string)

Update the status of Advanced Security for the project

function updateProjectEnablementStatus(savedAdvSecEnablementStatus: AdvSecEnablementSettingsUpdate, project: string): Promise<void>

Parameters

savedAdvSecEnablementStatus
AdvSecEnablementSettingsUpdate

The new status

project

string

Project ID or project name

Returns

Promise<void>

updateProjectEnablementStatus2(ProjectEnablementSettings, string)

Update the status of Advanced Security for the project

function updateProjectEnablementStatus2(savedAdvSecEnablementStatus: ProjectEnablementSettings, project: string): Promise<void>

Parameters

savedAdvSecEnablementStatus
ProjectEnablementSettings

The new status

project

string

Project ID or project name

Returns

Promise<void>

updateRepoAdvSecEnablementStatus(AdvSecEnablementStatusUpdate, string, string)

Update the enablement of Advanced Security for a repository

function updateRepoAdvSecEnablementStatus(savedAdvSecEnablementStatus: AdvSecEnablementStatusUpdate, project: string, repository: string): Promise<void>

Parameters

savedAdvSecEnablementStatus
AdvSecEnablementStatusUpdate

new status

project

string

Project ID or project name

repository

string

Name or ID of the repository

Returns

Promise<void>

updateRepoAdvSecEnablementStatus2(RepoEnablementSettings, string, string)

Update the enablement of Advanced Security for a repository

function updateRepoAdvSecEnablementStatus2(savedAdvSecEnablementStatus: RepoEnablementSettings, project: string, repository: string): Promise<void>

Parameters

savedAdvSecEnablementStatus
RepoEnablementSettings

new status

project

string

Project ID or project name

repository

string

Name or ID of the repository

Returns

Promise<void>