Package org.azd.extensionmanagement
Class ExtensionManagementRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.extensionmanagement.ExtensionManagementRequestBuilder
Extension management request builder to manage Extension management 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
ConstructorDescriptionExtensionManagementRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptionGet an installed extension by its publisher and extension id.Get an installed extension by its publisher and extension id.Get an installed extension by its publisher and extension id.Get an installed extension by its publisher and extension id.install
(InstallExtensionRequest installExtensionRequest) Install the specified extensioninstallAsync
(InstallExtensionRequest installExtensionRequest) Install the specified extensionlist()
List the installed extensionslist
(Consumer<ExtensionManagementRequestBuilder.RequestConfiguration> requestConfiguration) List the installed extensionsList the installed extensionslistAsync
(Consumer<ExtensionManagementRequestBuilder.RequestConfiguration> requestConfiguration) List the installed extensionsuninstall
(UnInstallExtensionRequest unInstallExtensionRequest) Uninstall the specified extensionuninstallAsync
(UnInstallExtensionRequest unInstallExtensionRequest) Uninstall the specified extensionupdate
(UpdateExtensionRequest updateExtensionRequest) Enable/disable an extensionupdateAsync
(UpdateExtensionRequest updateExtensionRequest) Enable/disable an extensionMethods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
ExtensionManagementRequestBuilder
public ExtensionManagementRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) 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<InstalledExtension> getAsync(String extensionId, String publisherId) throws AzDException Get an installed extension by its publisher and extension id.- Parameters:
extensionId
- Id of the extension. Example: "sonarqube".publisherId
- Id of the publisher. Example: "sonarsource".- Returns:
- InstalledExtension
InstalledExtension
- Throws:
AzDException
- Default Api Exception handler.
-
getAsync
public CompletableFuture<InstalledExtension> getAsync(String extensionId, String publisherId, String[] assetTypes) throws AzDException Get an installed extension by its publisher and extension id.- Parameters:
extensionId
- Id of the extension. Example: "sonarqube".publisherId
- Id of the publisher. Example: "sonarsource".assetTypes
- type of asset- Returns:
- InstalledExtension
InstalledExtension
- Throws:
AzDException
- Default Api Exception handler.
-
listAsync
List the installed extensions- Returns:
- InstalledExtensions
InstalledExtensions
- Throws:
AzDException
- Default Api Exception handler.
-
listAsync
public CompletableFuture<InstalledExtensions> listAsync(Consumer<ExtensionManagementRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException List the installed extensions- Parameters:
requestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
- InstalledExtensions
InstalledExtensions
- Throws:
AzDException
- Default Api Exception handler.
-
installAsync
public CompletableFuture<InstalledExtension> installAsync(InstallExtensionRequest installExtensionRequest) throws AzDException Install the specified extension- Parameters:
installExtensionRequest
- Publisher id and Extension id to install the extension. Optionally specify the version.- Returns:
- InstalledExtension
InstalledExtension
- Throws:
AzDException
- Default Api Exception handler.
-
uninstallAsync
public CompletableFuture<Void> uninstallAsync(UnInstallExtensionRequest unInstallExtensionRequest) throws AzDException Uninstall the specified extension- Parameters:
unInstallExtensionRequest
- Specify the publisher id and extension id to uninstall the extension. Optionally specify the reason and reason code.- Throws:
AzDException
- Default Api Exception handler.
-
updateAsync
public CompletableFuture<InstalledExtension> updateAsync(UpdateExtensionRequest updateExtensionRequest) throws AzDException Enable/disable an extension- Parameters:
updateExtensionRequest
- Specify the publisher id, extension id and extension flag value to enable/disable the extension.- Returns:
- InstalledExtension
InstalledExtension
- Throws:
AzDException
- Default Api Exception handler.
-
get
Get an installed extension by its publisher and extension id.- Parameters:
extensionId
- Id of the extension. Example: "sonarqube".publisherId
- Id of the publisher. Example: "sonarsource".- Returns:
- InstalledExtension
InstalledExtension
- Throws:
AzDException
- Default Api Exception handler.
-
get
public InstalledExtension get(String extensionId, String publisherId, String[] assetTypes) throws AzDException Get an installed extension by its publisher and extension id.- Parameters:
extensionId
- Id of the extension. Example: "sonarqube".publisherId
- Id of the publisher. Example: "sonarsource".assetTypes
- type of asset- Returns:
- InstalledExtension
InstalledExtension
- Throws:
AzDException
- Default Api Exception handler.
-
list
List the installed extensions- Returns:
- InstalledExtensions
InstalledExtensions
- Throws:
AzDException
- Default Api Exception handler.
-
list
public InstalledExtensions list(Consumer<ExtensionManagementRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException List the installed extensions- Parameters:
requestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
- InstalledExtensions
InstalledExtensions
- Throws:
AzDException
- Default Api Exception handler.
-
install
public InstalledExtension install(InstallExtensionRequest installExtensionRequest) throws AzDException Install the specified extension- Parameters:
installExtensionRequest
- Publisher id and Extension id to install the extension. Optionally specify the version.- Returns:
- InstalledExtension
InstalledExtension
- Throws:
AzDException
- Default Api Exception handler.
-
uninstall
Uninstall the specified extension- Parameters:
unInstallExtensionRequest
- Specify the publisher id and extension id to uninstall the extension. Optionally specify the reason and reason code.- Throws:
AzDException
- Default Api Exception handler.
-
update
Enable/disable an extension- Parameters:
updateExtensionRequest
- Specify the publisher id, extension id and extension flag value to enable/disable the extension.- Returns:
- InstalledExtension
InstalledExtension
- Throws:
AzDException
- Default Api Exception handler.
-