Interface Policies
public interface Policies
Resource collection API of Policies.
-
Method Summary
Modifier and TypeMethodDescriptionBegins definition for a new Policy resource.void
Delete policy.void
deleteById
(String id) Delete policy.com.azure.core.http.rest.Response<Void>
deleteByIdWithResponse
(String id, com.azure.core.util.Context context) 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.Get policy.com.azure.core.http.rest.Response<Policy>
getByIdWithResponse
(String id, String expand, com.azure.core.util.Context context) Get policy.com.azure.core.http.rest.Response<Policy>
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<Policy>
List policies in a given policy set.com.azure.core.http.rest.PagedIterable<Policy>
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.
-
Method Details
-
list
com.azure.core.http.rest.PagedIterable<Policy> 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<Policy> 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<Policy> 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.
-
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.
-
getById
Get policy.- Parameters:
id
- the resource ID.- 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.
-
getByIdWithResponse
com.azure.core.http.rest.Response<Policy> getByIdWithResponse(String id, String expand, com.azure.core.util.Context context) Get policy.- Parameters:
id
- the resource ID.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.
-
deleteById
Delete policy.- Parameters:
id
- the resource ID.- 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.
-
deleteByIdWithResponse
com.azure.core.http.rest.Response<Void> deleteByIdWithResponse(String id, com.azure.core.util.Context context) Delete policy.- Parameters:
id
- the resource ID.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.
-
define
Begins definition for a new Policy resource.- Parameters:
name
- resource name.- Returns:
- the first stage of the new Policy definition.
-