All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.compute.outputs.ScaleSetIdentity Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 6.10.0-alpha.1731737215
Show newest version
// *** 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.compute.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ScaleSetIdentity {
    /**
     * @return Specifies a list of user managed identity ids to be assigned to the VMSS. Required if `type` is `UserAssigned`.
     * 
     * <!--Start PulumiCodeChooser -->
     * 
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.azure.compute.ScaleSet;
     * import com.pulumi.azure.compute.ScaleSetArgs;
     * import com.pulumi.azure.compute.inputs.ScaleSetSkuArgs;
     * import com.pulumi.azure.compute.inputs.ScaleSetIdentityArgs;
     * import com.pulumi.azure.compute.inputs.ScaleSetExtensionArgs;
     * 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 ScaleSet("example", ScaleSetArgs.builder()
     *             .name("vm-scaleset")
     *             .resourceGroupName(exampleAzurermResourceGroup.name())
     *             .location(exampleAzurermResourceGroup.location())
     *             .sku(ScaleSetSkuArgs.builder()
     *                 .name(vmSku)
     *                 .tier("Standard")
     *                 .capacity(instanceCount)
     *                 .build())
     *             .identity(ScaleSetIdentityArgs.builder()
     *                 .type("SystemAssigned")
     *                 .build())
     *             .extensions(ScaleSetExtensionArgs.builder()
     *                 .name("MSILinuxExtension")
     *                 .publisher("Microsoft.ManagedIdentity")
     *                 .type("ManagedIdentityExtensionForLinux")
     *                 .typeHandlerVersion("1.0")
     *                 .settings("{\"port\": 50342}")
     *                 .build())
     *             .build());
     * 
     *         ctx.export("principalId", example.identity().applyValue(identity -> identity.principalId()));
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ private @Nullable List identityIds; private @Nullable String principalId; private @Nullable String tenantId; /** * @return Specifies the identity type to be assigned to the scale set. Allowable values are `SystemAssigned` and `UserAssigned`. For the `SystemAssigned` identity the scale set's Service Principal ID (SPN) can be retrieved after the scale set has been created. See [documentation](https://docs.microsoft.com/azure/active-directory/managed-service-identity/overview) for more information. Possible values are `SystemAssigned`, `UserAssigned` and `SystemAssigned, UserAssigned`. * */ private String type; private ScaleSetIdentity() {} /** * @return Specifies a list of user managed identity ids to be assigned to the VMSS. Required if `type` is `UserAssigned`. * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.azure.compute.ScaleSet;
     * import com.pulumi.azure.compute.ScaleSetArgs;
     * import com.pulumi.azure.compute.inputs.ScaleSetSkuArgs;
     * import com.pulumi.azure.compute.inputs.ScaleSetIdentityArgs;
     * import com.pulumi.azure.compute.inputs.ScaleSetExtensionArgs;
     * 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 ScaleSet("example", ScaleSetArgs.builder()
     *             .name("vm-scaleset")
     *             .resourceGroupName(exampleAzurermResourceGroup.name())
     *             .location(exampleAzurermResourceGroup.location())
     *             .sku(ScaleSetSkuArgs.builder()
     *                 .name(vmSku)
     *                 .tier("Standard")
     *                 .capacity(instanceCount)
     *                 .build())
     *             .identity(ScaleSetIdentityArgs.builder()
     *                 .type("SystemAssigned")
     *                 .build())
     *             .extensions(ScaleSetExtensionArgs.builder()
     *                 .name("MSILinuxExtension")
     *                 .publisher("Microsoft.ManagedIdentity")
     *                 .type("ManagedIdentityExtensionForLinux")
     *                 .typeHandlerVersion("1.0")
     *                 .settings("{\"port\": 50342}")
     *                 .build())
     *             .build());
     * 
     *         ctx.export("principalId", example.identity().applyValue(identity -> identity.principalId()));
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public List identityIds() { return this.identityIds == null ? List.of() : this.identityIds; } public Optional principalId() { return Optional.ofNullable(this.principalId); } public Optional tenantId() { return Optional.ofNullable(this.tenantId); } /** * @return Specifies the identity type to be assigned to the scale set. Allowable values are `SystemAssigned` and `UserAssigned`. For the `SystemAssigned` identity the scale set's Service Principal ID (SPN) can be retrieved after the scale set has been created. See [documentation](https://docs.microsoft.com/azure/active-directory/managed-service-identity/overview) for more information. Possible values are `SystemAssigned`, `UserAssigned` and `SystemAssigned, UserAssigned`. * */ public String type() { return this.type; } public static Builder builder() { return new Builder(); } public static Builder builder(ScaleSetIdentity defaults) { return new Builder(defaults); } @CustomType.Builder public static final class Builder { private @Nullable List identityIds; private @Nullable String principalId; private @Nullable String tenantId; private String type; public Builder() {} public Builder(ScaleSetIdentity defaults) { Objects.requireNonNull(defaults); this.identityIds = defaults.identityIds; this.principalId = defaults.principalId; this.tenantId = defaults.tenantId; this.type = defaults.type; } @CustomType.Setter public Builder identityIds(@Nullable List identityIds) { this.identityIds = identityIds; return this; } public Builder identityIds(String... identityIds) { return identityIds(List.of(identityIds)); } @CustomType.Setter public Builder principalId(@Nullable String principalId) { this.principalId = principalId; return this; } @CustomType.Setter public Builder tenantId(@Nullable String tenantId) { this.tenantId = tenantId; return this; } @CustomType.Setter public Builder type(String type) { if (type == null) { throw new MissingRequiredPropertyException("ScaleSetIdentity", "type"); } this.type = type; return this; } public ScaleSetIdentity build() { final var _resultValue = new ScaleSetIdentity(); _resultValue.identityIds = identityIds; _resultValue.principalId = principalId; _resultValue.tenantId = tenantId; _resultValue.type = type; return _resultValue; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy