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

com.pulumi.aws.licensemanager.LicenseGrant 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.aws.licensemanager;

import com.pulumi.aws.Utilities;
import com.pulumi.aws.licensemanager.LicenseGrantArgs;
import com.pulumi.aws.licensemanager.inputs.LicenseGrantState;
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;

/**
 * Provides a License Manager grant. This allows for sharing licenses with other AWS accounts.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * <!--End PulumiCodeChooser -->
 * 
 * ## Import
 * 
 * Using `pulumi import`, import `aws_licensemanager_grant` using the grant arn. For example:
 * 
 * ```sh
 * $ pulumi import aws:licensemanager/licenseGrant:LicenseGrant test arn:aws:license-manager::123456789011:grant:g-01d313393d9e443d8664cc054db1e089
 * ```
 * 
 */
@ResourceType(type="aws:licensemanager/licenseGrant:LicenseGrant")
public class LicenseGrant extends com.pulumi.resources.CustomResource {
    /**
     * A list of the allowed operations for the grant. This is a subset of the allowed operations on the license.
     * 
     */
    @Export(name="allowedOperations", refs={List.class,String.class}, tree="[0,1]")
    private Output> allowedOperations;

    /**
     * @return A list of the allowed operations for the grant. This is a subset of the allowed operations on the license.
     * 
     */
    public Output> allowedOperations() {
        return this.allowedOperations;
    }
    /**
     * The grant ARN.
     * 
     */
    @Export(name="arn", refs={String.class}, tree="[0]")
    private Output arn;

    /**
     * @return The grant ARN.
     * 
     */
    public Output arn() {
        return this.arn;
    }
    /**
     * The home region for the license.
     * 
     */
    @Export(name="homeRegion", refs={String.class}, tree="[0]")
    private Output homeRegion;

    /**
     * @return The home region for the license.
     * 
     */
    public Output homeRegion() {
        return this.homeRegion;
    }
    /**
     * The ARN of the license to grant.
     * 
     */
    @Export(name="licenseArn", refs={String.class}, tree="[0]")
    private Output licenseArn;

    /**
     * @return The ARN of the license to grant.
     * 
     */
    public Output licenseArn() {
        return this.licenseArn;
    }
    /**
     * The Name of the grant.
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output name;

    /**
     * @return The Name of the grant.
     * 
     */
    public Output name() {
        return this.name;
    }
    /**
     * The parent ARN.
     * 
     */
    @Export(name="parentArn", refs={String.class}, tree="[0]")
    private Output parentArn;

    /**
     * @return The parent ARN.
     * 
     */
    public Output parentArn() {
        return this.parentArn;
    }
    /**
     * The target account for the grant in the form of the ARN for an account principal of the root user.
     * 
     */
    @Export(name="principal", refs={String.class}, tree="[0]")
    private Output principal;

    /**
     * @return The target account for the grant in the form of the ARN for an account principal of the root user.
     * 
     */
    public Output principal() {
        return this.principal;
    }
    /**
     * The grant status.
     * 
     */
    @Export(name="status", refs={String.class}, tree="[0]")
    private Output status;

    /**
     * @return The grant status.
     * 
     */
    public Output status() {
        return this.status;
    }
    /**
     * The grant version.
     * 
     */
    @Export(name="version", refs={String.class}, tree="[0]")
    private Output version;

    /**
     * @return The grant version.
     * 
     */
    public Output version() {
        return this.version;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public LicenseGrant(java.lang.String name) {
        this(name, LicenseGrantArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public LicenseGrant(java.lang.String name, LicenseGrantArgs 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 LicenseGrant(java.lang.String name, LicenseGrantArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("aws:licensemanager/licenseGrant:LicenseGrant", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
    }

    private LicenseGrant(java.lang.String name, Output id, @Nullable LicenseGrantState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("aws:licensemanager/licenseGrant:LicenseGrant", name, state, makeResourceOptions(options, id), false);
    }

    private static LicenseGrantArgs makeArgs(LicenseGrantArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        if (options != null && options.getUrn().isPresent()) {
            return null;
        }
        return args == null ? LicenseGrantArgs.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())
            .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 LicenseGrant get(java.lang.String name, Output id, @Nullable LicenseGrantState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new LicenseGrant(name, id, state, options);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy