PolicyDefinitions interface

Interface representing a PolicyDefinitions.

Methods

createOrUpdate(string, PolicyDefinition, PolicyDefinitionsCreateOrUpdateOptionalParams)

This operation creates or updates a policy definition in the given subscription with the given name.

createOrUpdateAtManagementGroup(string, string, PolicyDefinition, PolicyDefinitionsCreateOrUpdateAtManagementGroupOptionalParams)

This operation creates or updates a policy definition in the given management group with the given name.

delete(string, PolicyDefinitionsDeleteOptionalParams)

This operation deletes the policy definition in the given subscription with the given name.

deleteAtManagementGroup(string, string, PolicyDefinitionsDeleteAtManagementGroupOptionalParams)

This operation deletes the policy definition in the given management group with the given name.

get(string, PolicyDefinitionsGetOptionalParams)

This operation retrieves the policy definition in the given subscription with the given name.

getAtManagementGroup(string, string, PolicyDefinitionsGetAtManagementGroupOptionalParams)

This operation retrieves the policy definition in the given management group with the given name.

getBuiltIn(string, PolicyDefinitionsGetBuiltInOptionalParams)

This operation retrieves the built-in policy definition with the given name.

list(PolicyDefinitionsListOptionalParams)

This operation retrieves a list of all the policy definitions in a given subscription that match the optional given $filter. Valid values for $filter are: 'atExactScope()', 'policyType -eq {value}' or 'category eq '{value}''. If $filter is not provided, the unfiltered list includes all policy definitions associated with the subscription, including those that apply directly or from management groups that contain the given subscription. If $filter=atExactScope() is provided, the returned list only includes all policy definitions that at the given subscription. If $filter='policyType -eq {value}' is provided, the returned list only includes all policy definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is provided, the returned list only includes all policy definitions whose category match the {value}.

listBuiltIn(PolicyDefinitionsListBuiltInOptionalParams)

This operation retrieves a list of all the built-in policy definitions that match the optional given $filter. If $filter='policyType -eq {value}' is provided, the returned list only includes all built-in policy definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is provided, the returned list only includes all built-in policy definitions whose category match the {value}.

listByManagementGroup(string, PolicyDefinitionsListByManagementGroupOptionalParams)

This operation retrieves a list of all the policy definitions in a given management group that match the optional given $filter. Valid values for $filter are: 'atExactScope()', 'policyType -eq {value}' or 'category eq '{value}''. If $filter is not provided, the unfiltered list includes all policy definitions associated with the management group, including those that apply directly or from management groups that contain the given management group. If $filter=atExactScope() is provided, the returned list only includes all policy definitions that at the given management group. If $filter='policyType -eq {value}' is provided, the returned list only includes all policy definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is provided, the returned list only includes all policy definitions whose category match the {value}.

Method Details

createOrUpdate(string, PolicyDefinition, PolicyDefinitionsCreateOrUpdateOptionalParams)

This operation creates or updates a policy definition in the given subscription with the given name.

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)

This operation creates or updates a policy definition in the given management group with the given name.

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)

This operation deletes the policy definition in the given subscription with the given name.

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)

This operation deletes the policy definition in the given management group with the given name.

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)

This operation retrieves the policy definition in the given subscription with the given name.

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)

This operation retrieves the policy definition in the given management group with the given name.

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)

This operation retrieves the built-in policy definition with the given name.

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)

This operation retrieves a list of all the policy definitions in a given subscription that match the optional given $filter. Valid values for $filter are: 'atExactScope()', 'policyType -eq {value}' or 'category eq '{value}''. If $filter is not provided, the unfiltered list includes all policy definitions associated with the subscription, including those that apply directly or from management groups that contain the given subscription. If $filter=atExactScope() is provided, the returned list only includes all policy definitions that at the given subscription. If $filter='policyType -eq {value}' is provided, the returned list only includes all policy definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is provided, the returned list only includes all policy definitions whose category match the {value}.

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

Parameters

options
PolicyDefinitionsListOptionalParams

The options parameters.

Returns

listBuiltIn(PolicyDefinitionsListBuiltInOptionalParams)

This operation retrieves a list of all the built-in policy definitions that match the optional given $filter. If $filter='policyType -eq {value}' is provided, the returned list only includes all built-in policy definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is provided, the returned list only includes all built-in policy definitions whose category match the {value}.

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

Parameters

options
PolicyDefinitionsListBuiltInOptionalParams

The options parameters.

Returns

listByManagementGroup(string, PolicyDefinitionsListByManagementGroupOptionalParams)

This operation retrieves a list of all the policy definitions in a given management group that match the optional given $filter. Valid values for $filter are: 'atExactScope()', 'policyType -eq {value}' or 'category eq '{value}''. If $filter is not provided, the unfiltered list includes all policy definitions associated with the management group, including those that apply directly or from management groups that contain the given management group. If $filter=atExactScope() is provided, the returned list only includes all policy definitions that at the given management group. If $filter='policyType -eq {value}' is provided, the returned list only includes all policy definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is provided, the returned list only includes all policy definitions whose category match the {value}.

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

Parameters

managementGroupId

string

The ID of the management group.

Returns