Package org.azd.policy.revisions
Class RevisionsRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.policy.revisions.RevisionsRequestBuilder
Provides functionality to work with Policy Revisions Api.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents the query parameters.static class
Request configuration object for the query parameters.Nested classes/interfaces inherited from class org.azd.abstractions.BaseRequestBuilder
BaseRequestBuilder.ProjectExcludeParameter
-
Field Summary
Fields inherited from class org.azd.abstractions.BaseRequestBuilder
accessTokenCredential, apiVersion, area, locationId, organizationUrl, serializer
-
Constructor Summary
ConstructorDescriptionRevisionsRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptionRetrieve a specific revision of a given policy by ID.Retrieve a specific revision of a given policy by ID.Retrieve all revisions for a given policy.list
(String configurationId, Consumer<RevisionsRequestBuilder.RequestConfiguration> requestConfiguration) Retrieve all revisions for a given policy.Retrieve all revisions for a given policy.listAsync
(String configurationId, Consumer<RevisionsRequestBuilder.RequestConfiguration> requestConfiguration) Retrieve all revisions for a given policy.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
RevisionsRequestBuilder
Instantiates a new RequestBuilder instance and sets the default values.- Parameters:
organizationUrl
- Represents organization location request url.accessTokenCredential
- Access token credential object.
-
-
Method Details
-
getAsync
public CompletableFuture<PolicyConfiguration> getAsync(String configurationId, String revisionId) throws AzDException Retrieve a specific revision of a given policy by ID.- Parameters:
configurationId
- The policy configuration ID.revisionId
- The revision ID.- Returns:
- Policy configuration object
PolicyConfiguration
- Throws:
AzDException
- Default Api exception handler.
-
listAsync
public CompletableFuture<PolicyConfigurations> listAsync(String configurationId) throws AzDException Retrieve all revisions for a given policy.- Parameters:
configurationId
- The policy configuration ID.- Returns:
- Collection of policy configuration object
PolicyConfigurations
- Throws:
AzDException
- Default Api exception handler.
-
listAsync
public CompletableFuture<PolicyConfigurations> listAsync(String configurationId, Consumer<RevisionsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Retrieve all revisions for a given policy.- Parameters:
configurationId
- The policy configuration ID.requestConfiguration
- Represents query parameters.- Returns:
- Collection of policy configuration object
PolicyConfigurations
- Throws:
AzDException
- Default Api exception handler.
-
get
Retrieve a specific revision of a given policy by ID.- Parameters:
configurationId
- The policy configuration ID.revisionId
- The revision ID.- Returns:
- Policy configuration object
PolicyConfiguration
- Throws:
AzDException
- Default Api exception handler.
-
list
Retrieve all revisions for a given policy.- Parameters:
configurationId
- The policy configuration ID.- Returns:
- Collection of policy configuration object
PolicyConfigurations
- Throws:
AzDException
- Default Api exception handler.
-
list
public PolicyConfigurations list(String configurationId, Consumer<RevisionsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Retrieve all revisions for a given policy.- Parameters:
configurationId
- The policy configuration ID.requestConfiguration
- Represents query parameters.- Returns:
- Collection of policy configuration object
PolicyConfigurations
- Throws:
AzDException
- Default Api exception handler.
-