PolicyDefinitions interface

Interface representing a PolicyDefinitions.

Methods

createOrUpdate(string, PolicyDefinition, PolicyDefinitionsCreateOrUpdateOptionalParams)

Creates or updates a policy definition.

createOrUpdateAtManagementGroup(string, string, PolicyDefinition, PolicyDefinitionsCreateOrUpdateAtManagementGroupOptionalParams)

Creates or updates a policy definition at management group level.

delete(string, PolicyDefinitionsDeleteOptionalParams)

Deletes a policy definition.

deleteAtManagementGroup(string, string, PolicyDefinitionsDeleteAtManagementGroupOptionalParams)

Deletes a policy definition at management group level.

get(string, PolicyDefinitionsGetOptionalParams)

Gets the policy definition.

getAtManagementGroup(string, string, PolicyDefinitionsGetAtManagementGroupOptionalParams)

Gets the policy definition at management group level.

getBuiltIn(string, PolicyDefinitionsGetBuiltInOptionalParams)

Gets the built in policy definition.

list(PolicyDefinitionsListOptionalParams)

Gets all the policy definitions for a subscription.

listBuiltIn(PolicyDefinitionsListBuiltInOptionalParams)

Gets all the built in policy definitions.

listByManagementGroup(string, PolicyDefinitionsListByManagementGroupOptionalParams)

Gets all the policy definitions for a subscription at management group level.

Method Details

createOrUpdate(string, PolicyDefinition, PolicyDefinitionsCreateOrUpdateOptionalParams)

Creates or updates a policy definition.

function createOrUpdate(policyDefinitionName: string, parameters: PolicyDefinition, options?: PolicyDefinitionsCreateOrUpdateOptionalParams): Promise<PolicyDefinition>

Parameters

policyDefinitionName

string

The name of the policy definition to create.

parameters
PolicyDefinition

The policy definition properties.

options
PolicyDefinitionsCreateOrUpdateOptionalParams

The options parameters.

Returns

Promise<PolicyDefinition>

createOrUpdateAtManagementGroup(string, string, PolicyDefinition, PolicyDefinitionsCreateOrUpdateAtManagementGroupOptionalParams)

Creates or updates a policy definition at management group level.

function createOrUpdateAtManagementGroup(policyDefinitionName: string, managementGroupId: string, parameters: PolicyDefinition, options?: PolicyDefinitionsCreateOrUpdateAtManagementGroupOptionalParams): Promise<PolicyDefinition>

Parameters

policyDefinitionName

string

The name of the policy definition to create.

managementGroupId

string

The ID of the management group.

parameters
PolicyDefinition

The policy definition properties.

Returns

Promise<PolicyDefinition>

delete(string, PolicyDefinitionsDeleteOptionalParams)

Deletes a policy definition.

function delete(policyDefinitionName: string, options?: PolicyDefinitionsDeleteOptionalParams): Promise<void>

Parameters

policyDefinitionName

string

The name of the policy definition to delete.

options
PolicyDefinitionsDeleteOptionalParams

The options parameters.

Returns

Promise<void>

deleteAtManagementGroup(string, string, PolicyDefinitionsDeleteAtManagementGroupOptionalParams)

Deletes a policy definition at management group level.

function deleteAtManagementGroup(policyDefinitionName: string, managementGroupId: string, options?: PolicyDefinitionsDeleteAtManagementGroupOptionalParams): Promise<void>

Parameters

policyDefinitionName

string

The name of the policy definition to delete.

managementGroupId

string

The ID of the management group.

Returns

Promise<void>

get(string, PolicyDefinitionsGetOptionalParams)

Gets the policy definition.

function get(policyDefinitionName: string, options?: PolicyDefinitionsGetOptionalParams): Promise<PolicyDefinition>

Parameters

policyDefinitionName

string

The name of the policy definition to get.

options
PolicyDefinitionsGetOptionalParams

The options parameters.

Returns

Promise<PolicyDefinition>

getAtManagementGroup(string, string, PolicyDefinitionsGetAtManagementGroupOptionalParams)

Gets the policy definition at management group level.

function getAtManagementGroup(policyDefinitionName: string, managementGroupId: string, options?: PolicyDefinitionsGetAtManagementGroupOptionalParams): Promise<PolicyDefinition>

Parameters

policyDefinitionName

string

The name of the policy definition to get.

managementGroupId

string

The ID of the management group.

options
PolicyDefinitionsGetAtManagementGroupOptionalParams

The options parameters.

Returns

Promise<PolicyDefinition>

getBuiltIn(string, PolicyDefinitionsGetBuiltInOptionalParams)

Gets the built in policy definition.

function getBuiltIn(policyDefinitionName: string, options?: PolicyDefinitionsGetBuiltInOptionalParams): Promise<PolicyDefinition>

Parameters

policyDefinitionName

string

The name of the built in policy definition to get.

options
PolicyDefinitionsGetBuiltInOptionalParams

The options parameters.

Returns

Promise<PolicyDefinition>

list(PolicyDefinitionsListOptionalParams)

Gets all the policy definitions for a subscription.

function list(options?: PolicyDefinitionsListOptionalParams): PagedAsyncIterableIterator<PolicyDefinition, PolicyDefinition[], PageSettings>

Parameters

options
PolicyDefinitionsListOptionalParams

The options parameters.

Returns

listBuiltIn(PolicyDefinitionsListBuiltInOptionalParams)

Gets all the built in policy definitions.

function listBuiltIn(options?: PolicyDefinitionsListBuiltInOptionalParams): PagedAsyncIterableIterator<PolicyDefinition, PolicyDefinition[], PageSettings>

Parameters

options
PolicyDefinitionsListBuiltInOptionalParams

The options parameters.

Returns

listByManagementGroup(string, PolicyDefinitionsListByManagementGroupOptionalParams)

Gets all the policy definitions for a subscription at management group level.

function listByManagementGroup(managementGroupId: string, options?: PolicyDefinitionsListByManagementGroupOptionalParams): PagedAsyncIterableIterator<PolicyDefinition, PolicyDefinition[], PageSettings>

Parameters

managementGroupId

string

The ID of the management group.

Returns