
com.pulumi.azurenative.billing.BillingRoleAssignmentByDepartment Maven / Gradle / Ivy
// *** 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.azurenative.billing;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.billing.BillingRoleAssignmentByDepartmentArgs;
import com.pulumi.core.Alias;
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 java.util.Optional;
import javax.annotation.Nullable;
/**
* The role assignment
* Azure REST API version: 2019-10-01-preview. Prior API version in Azure Native 1.x: 2019-10-01-preview.
*
* Other available API versions: 2024-04-01.
*
* ## Example Usage
* ### PutEnrollmentDepartmentAdministratorRoleAssignment
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.billing.BillingRoleAssignmentByDepartment;
* import com.pulumi.azurenative.billing.BillingRoleAssignmentByDepartmentArgs;
* 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 billingRoleAssignmentByDepartment = new BillingRoleAssignmentByDepartment("billingRoleAssignmentByDepartment", BillingRoleAssignmentByDepartmentArgs.builder()
* .billingAccountName("{billingAccountName}")
* .billingRoleAssignmentName("{billingRoleAssignmentName}")
* .departmentName("{departmentName}")
* .principalId("99a1a759-30dd-42c2-828c-db398826bb67")
* .principalTenantId("7ca289b9-c32d-4f01-8566-7ff93261d76f")
* .roleDefinitionId("/providers/Microsoft.Billing/billingAccounts/7898901/departments/97603/billingRoleDefinitions/fb2cf67f-be5b-42e7-8025-4683c668f840")
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:billing:BillingRoleAssignmentByDepartment 9dfd08c2-62a3-4d47-85bd-1cdba1408402 /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}/billingRoleAssignments/{billingRoleAssignmentName}
* ```
*
*/
@ResourceType(type="azure-native:billing:BillingRoleAssignmentByDepartment")
public class BillingRoleAssignmentByDepartment extends com.pulumi.resources.CustomResource {
/**
* The principal Id of the user who created the role assignment.
*
*/
@Export(name="createdByPrincipalId", refs={String.class}, tree="[0]")
private Output createdByPrincipalId;
/**
* @return The principal Id of the user who created the role assignment.
*
*/
public Output createdByPrincipalId() {
return this.createdByPrincipalId;
}
/**
* The tenant Id of the user who created the role assignment.
*
*/
@Export(name="createdByPrincipalTenantId", refs={String.class}, tree="[0]")
private Output createdByPrincipalTenantId;
/**
* @return The tenant Id of the user who created the role assignment.
*
*/
public Output createdByPrincipalTenantId() {
return this.createdByPrincipalTenantId;
}
/**
* The email address of the user who created the role assignment. This is supported only for billing accounts with agreement type Enterprise Agreement.
*
*/
@Export(name="createdByUserEmailAddress", refs={String.class}, tree="[0]")
private Output createdByUserEmailAddress;
/**
* @return The email address of the user who created the role assignment. This is supported only for billing accounts with agreement type Enterprise Agreement.
*
*/
public Output createdByUserEmailAddress() {
return this.createdByUserEmailAddress;
}
/**
* The date the role assignment was created.
*
*/
@Export(name="createdOn", refs={String.class}, tree="[0]")
private Output createdOn;
/**
* @return The date the role assignment was created.
*
*/
public Output createdOn() {
return this.createdOn;
}
/**
* Resource name.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Resource name.
*
*/
public Output name() {
return this.name;
}
/**
* The principal id of the user to whom the role was assigned.
*
*/
@Export(name="principalId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> principalId;
/**
* @return The principal id of the user to whom the role was assigned.
*
*/
public Output> principalId() {
return Codegen.optional(this.principalId);
}
/**
* The principal tenant id of the user to whom the role was assigned.
*
*/
@Export(name="principalTenantId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> principalTenantId;
/**
* @return The principal tenant id of the user to whom the role was assigned.
*
*/
public Output> principalTenantId() {
return Codegen.optional(this.principalTenantId);
}
/**
* The ID of the role definition.
*
*/
@Export(name="roleDefinitionId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> roleDefinitionId;
/**
* @return The ID of the role definition.
*
*/
public Output> roleDefinitionId() {
return Codegen.optional(this.roleDefinitionId);
}
/**
* The scope at which the role was assigned.
*
*/
@Export(name="scope", refs={String.class}, tree="[0]")
private Output scope;
/**
* @return The scope at which the role was assigned.
*
*/
public Output scope() {
return this.scope;
}
/**
* Resource type.
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return Resource type.
*
*/
public Output type() {
return this.type;
}
/**
* The authentication type of the user, whether Organization or MSA, of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
*
*/
@Export(name="userAuthenticationType", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> userAuthenticationType;
/**
* @return The authentication type of the user, whether Organization or MSA, of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
*
*/
public Output> userAuthenticationType() {
return Codegen.optional(this.userAuthenticationType);
}
/**
* The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
*
*/
@Export(name="userEmailAddress", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> userEmailAddress;
/**
* @return The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
*
*/
public Output> userEmailAddress() {
return Codegen.optional(this.userEmailAddress);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public BillingRoleAssignmentByDepartment(java.lang.String name) {
this(name, BillingRoleAssignmentByDepartmentArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public BillingRoleAssignmentByDepartment(java.lang.String name, BillingRoleAssignmentByDepartmentArgs 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 BillingRoleAssignmentByDepartment(java.lang.String name, BillingRoleAssignmentByDepartmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:billing:BillingRoleAssignmentByDepartment", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private BillingRoleAssignmentByDepartment(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:billing:BillingRoleAssignmentByDepartment", name, null, makeResourceOptions(options, id), false);
}
private static BillingRoleAssignmentByDepartmentArgs makeArgs(BillingRoleAssignmentByDepartmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? BillingRoleAssignmentByDepartmentArgs.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())
.aliases(List.of(
Output.of(Alias.builder().type("azure-native:billing/v20191001preview:BillingRoleAssignmentByDepartment").build()),
Output.of(Alias.builder().type("azure-native:billing/v20240401:BillingRoleAssignmentByDepartment").build())
))
.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 options Optional settings to control the behavior of the CustomResource.
*/
public static BillingRoleAssignmentByDepartment get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new BillingRoleAssignmentByDepartment(name, id, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy