com.pulumi.azure.desktopvirtualization.GetHostPoolRegistrationInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azure.desktopvirtualization;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.desktopvirtualization.GetHostPoolRegistrationInfoArgs;
import com.pulumi.azure.desktopvirtualization.inputs.GetHostPoolRegistrationInfoState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import javax.annotation.Nullable;
/**
* Manages the Registration Info for a Virtual Desktop Host Pool.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.desktopvirtualization.HostPool;
* import com.pulumi.azure.desktopvirtualization.HostPoolArgs;
* import com.pulumi.azure.desktopvirtualization.getHostPoolRegistrationInfo;
* import com.pulumi.azure.desktopvirtualization.GetHostPoolRegistrationInfoArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-hostpool")
* .location("westeurope")
* .build());
*
* var exampleHostPool = new HostPool("exampleHostPool", HostPoolArgs.builder()
* .name("example-HP")
* .location(example.location())
* .resourceGroupName(example.name())
* .type("Pooled")
* .validateEnvironment(true)
* .loadBalancerType("BreadthFirst")
* .build());
*
* var exampleGetHostPoolRegistrationInfo = new GetHostPoolRegistrationInfo("exampleGetHostPoolRegistrationInfo", GetHostPoolRegistrationInfoArgs.builder()
* .hostpoolId(exampleHostPool.id())
* .expirationDate("2022-01-01T23:40:52Z")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* AVD Registration Infos can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:desktopvirtualization/getHostPoolRegistrationInfo:getHostPoolRegistrationInfo example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DesktopVirtualization/hostPools/pool1/registrationInfo/default
* ```
*
*/
@ResourceType(type="azure:desktopvirtualization/getHostPoolRegistrationInfo:getHostPoolRegistrationInfo")
public class GetHostPoolRegistrationInfo extends com.pulumi.resources.CustomResource {
/**
* A valid `RFC3339Time` for the expiration of the token..
*
*/
@Export(name="expirationDate", refs={String.class}, tree="[0]")
private Output expirationDate;
/**
* @return A valid `RFC3339Time` for the expiration of the token..
*
*/
public Output expirationDate() {
return this.expirationDate;
}
/**
* The ID of the Virtual Desktop Host Pool to link the Registration Info to. Changing this forces a new Registration Info resource to be created. Only a single virtual_desktop_host_pool_registration_info resource should be associated with a given hostpool. Assigning multiple resources will produce inconsistent results.
*
*/
@Export(name="hostpoolId", refs={String.class}, tree="[0]")
private Output hostpoolId;
/**
* @return The ID of the Virtual Desktop Host Pool to link the Registration Info to. Changing this forces a new Registration Info resource to be created. Only a single virtual_desktop_host_pool_registration_info resource should be associated with a given hostpool. Assigning multiple resources will produce inconsistent results.
*
*/
public Output hostpoolId() {
return this.hostpoolId;
}
/**
* The registration token generated by the Virtual Desktop Host Pool for registration of session hosts.
*
*/
@Export(name="token", refs={String.class}, tree="[0]")
private Output token;
/**
* @return The registration token generated by the Virtual Desktop Host Pool for registration of session hosts.
*
*/
public Output token() {
return this.token;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public GetHostPoolRegistrationInfo(java.lang.String name) {
this(name, GetHostPoolRegistrationInfoArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public GetHostPoolRegistrationInfo(java.lang.String name, GetHostPoolRegistrationInfoArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public GetHostPoolRegistrationInfo(java.lang.String name, GetHostPoolRegistrationInfoArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:desktopvirtualization/getHostPoolRegistrationInfo:getHostPoolRegistrationInfo", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private GetHostPoolRegistrationInfo(java.lang.String name, Output id, @Nullable GetHostPoolRegistrationInfoState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:desktopvirtualization/getHostPoolRegistrationInfo:getHostPoolRegistrationInfo", name, state, makeResourceOptions(options, id), false);
}
private static GetHostPoolRegistrationInfoArgs makeArgs(GetHostPoolRegistrationInfoArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? GetHostPoolRegistrationInfoArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.additionalSecretOutputs(List.of(
"token"
))
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static GetHostPoolRegistrationInfo get(java.lang.String name, Output id, @Nullable GetHostPoolRegistrationInfoState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new GetHostPoolRegistrationInfo(name, id, state, options);
}
}