Interface PoliciesClient
public interface PoliciesClient
An instance of this class provides access to all the operations defined in PoliciesClient.
-
Method Summary
Modifier and TypeMethodDescriptioncreateOrUpdate
(String resourceGroupName, String labName, String policySetName, String name, PolicyInner policy) Create or replace an existing policy.com.azure.core.http.rest.Response<PolicyInner>
createOrUpdateWithResponse
(String resourceGroupName, String labName, String policySetName, String name, PolicyInner policy, com.azure.core.util.Context context) Create or replace an existing policy.void
Delete policy.com.azure.core.http.rest.Response<Void>
deleteWithResponse
(String resourceGroupName, String labName, String policySetName, String name, com.azure.core.util.Context context) Delete policy.Get policy.com.azure.core.http.rest.Response<PolicyInner>
getWithResponse
(String resourceGroupName, String labName, String policySetName, String name, String expand, com.azure.core.util.Context context) Get policy.com.azure.core.http.rest.PagedIterable<PolicyInner>
List policies in a given policy set.com.azure.core.http.rest.PagedIterable<PolicyInner>
list
(String resourceGroupName, String labName, String policySetName, String expand, String filter, Integer top, String orderby, com.azure.core.util.Context context) List policies in a given policy set.update
(String resourceGroupName, String labName, String policySetName, String name, PolicyFragment policy) Allows modifying tags of policies.com.azure.core.http.rest.Response<PolicyInner>
updateWithResponse
(String resourceGroupName, String labName, String policySetName, String name, PolicyFragment policy, com.azure.core.util.Context context) Allows modifying tags of policies.
-
Method Details
-
list
com.azure.core.http.rest.PagedIterable<PolicyInner> list(String resourceGroupName, String labName, String policySetName) List policies in a given policy set.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.policySetName
- The name of the policy set.- Returns:
- the response of a list operation as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
list
com.azure.core.http.rest.PagedIterable<PolicyInner> list(String resourceGroupName, String labName, String policySetName, String expand, String filter, Integer top, String orderby, com.azure.core.util.Context context) List policies in a given policy set.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.policySetName
- The name of the policy set.expand
- Specify the $expand query. Example: 'properties($select=description)'.filter
- The filter to apply to the operation. Example: '$filter=contains(name,'myName').top
- The maximum number of resources to return from the operation. Example: '$top=10'.orderby
- The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.context
- The context to associate with this operation.- Returns:
- the response of a list operation as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getWithResponse
com.azure.core.http.rest.Response<PolicyInner> getWithResponse(String resourceGroupName, String labName, String policySetName, String name, String expand, com.azure.core.util.Context context) Get policy.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.policySetName
- The name of the policy set.name
- The name of the policy.expand
- Specify the $expand query. Example: 'properties($select=description)'.context
- The context to associate with this operation.- Returns:
- policy along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
get
Get policy.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.policySetName
- The name of the policy set.name
- The name of the policy.- Returns:
- policy.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
createOrUpdateWithResponse
com.azure.core.http.rest.Response<PolicyInner> createOrUpdateWithResponse(String resourceGroupName, String labName, String policySetName, String name, PolicyInner policy, com.azure.core.util.Context context) Create or replace an existing policy.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.policySetName
- The name of the policy set.name
- The name of the policy.policy
- A Policy.context
- The context to associate with this operation.- Returns:
- a Policy along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
createOrUpdate
PolicyInner createOrUpdate(String resourceGroupName, String labName, String policySetName, String name, PolicyInner policy) Create or replace an existing policy.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.policySetName
- The name of the policy set.name
- The name of the policy.policy
- A Policy.- Returns:
- a Policy.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
deleteWithResponse
com.azure.core.http.rest.Response<Void> deleteWithResponse(String resourceGroupName, String labName, String policySetName, String name, com.azure.core.util.Context context) Delete policy.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.policySetName
- The name of the policy set.name
- The name of the policy.context
- The context to associate with this operation.- Returns:
- the
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
delete
Delete policy.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.policySetName
- The name of the policy set.name
- The name of the policy.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
updateWithResponse
com.azure.core.http.rest.Response<PolicyInner> updateWithResponse(String resourceGroupName, String labName, String policySetName, String name, PolicyFragment policy, com.azure.core.util.Context context) Allows modifying tags of policies. All other properties will be ignored.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.policySetName
- The name of the policy set.name
- The name of the policy.policy
- A Policy.context
- The context to associate with this operation.- Returns:
- a Policy along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
update
PolicyInner update(String resourceGroupName, String labName, String policySetName, String name, PolicyFragment policy) Allows modifying tags of policies. All other properties will be ignored.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.policySetName
- The name of the policy set.name
- The name of the policy.policy
- A Policy.- Returns:
- a Policy.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-