licensemanager

package
v3.32.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Association

type Association struct {
	pulumi.CustomResourceState

	// ARN of the license configuration.
	LicenseConfigurationArn pulumi.StringOutput `pulumi:"licenseConfigurationArn"`
	// ARN of the resource associated with the license configuration.
	ResourceArn pulumi.StringOutput `pulumi:"resourceArn"`
}

Provides a License Manager association.

> **Note:** License configurations can also be associated with launch templates by specifying the `licenseSpecifications` block for an `ec2.LaunchTemplate`.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/ec2"
"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/licensemanager"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := true
		exampleAmi, err := ec2.LookupAmi(ctx, &ec2.LookupAmiArgs{
			MostRecent: &opt0,
			Owners: []string{
				"amazon",
			},
			Filters: []ec2.GetAmiFilter{
				ec2.GetAmiFilter{
					Name: "name",
					Values: []string{
						"amzn-ami-vpc-nat*",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		exampleInstance, err := ec2.NewInstance(ctx, "exampleInstance", &ec2.InstanceArgs{
			Ami:          pulumi.String(exampleAmi.Id),
			InstanceType: pulumi.String("t2.micro"),
		})
		if err != nil {
			return err
		}
		exampleLicenseConfiguration, err := licensemanager.NewLicenseConfiguration(ctx, "exampleLicenseConfiguration", &licensemanager.LicenseConfigurationArgs{
			LicenseCountingType: pulumi.String("Instance"),
		})
		if err != nil {
			return err
		}
		_, err = licensemanager.NewAssociation(ctx, "exampleAssociation", &licensemanager.AssociationArgs{
			LicenseConfigurationArn: exampleLicenseConfiguration.Arn,
			ResourceArn:             exampleInstance.Arn,
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

License configurations can be imported in the form `resource_arn,license_configuration_arn`, e.g.

```sh

$ pulumi import aws:licensemanager/association:Association example arn:aws:ec2:eu-west-1:123456789012:image/ami-123456789abcdef01,arn:aws:license-manager:eu-west-1:123456789012:license-configuration:lic-0123456789abcdef0123456789abcdef

```

func GetAssociation

func GetAssociation(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AssociationState, opts ...pulumi.ResourceOption) (*Association, error)

GetAssociation gets an existing Association resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewAssociation

func NewAssociation(ctx *pulumi.Context,
	name string, args *AssociationArgs, opts ...pulumi.ResourceOption) (*Association, error)

NewAssociation registers a new resource with the given unique name, arguments, and options.

func (*Association) ElementType added in v3.13.0

func (*Association) ElementType() reflect.Type

func (*Association) ToAssociationOutput added in v3.13.0

func (i *Association) ToAssociationOutput() AssociationOutput

func (*Association) ToAssociationOutputWithContext added in v3.13.0

func (i *Association) ToAssociationOutputWithContext(ctx context.Context) AssociationOutput

func (*Association) ToAssociationPtrOutput added in v3.25.0

func (i *Association) ToAssociationPtrOutput() AssociationPtrOutput

func (*Association) ToAssociationPtrOutputWithContext added in v3.25.0

func (i *Association) ToAssociationPtrOutputWithContext(ctx context.Context) AssociationPtrOutput

type AssociationArgs

type AssociationArgs struct {
	// ARN of the license configuration.
	LicenseConfigurationArn pulumi.StringInput
	// ARN of the resource associated with the license configuration.
	ResourceArn pulumi.StringInput
}

The set of arguments for constructing a Association resource.

func (AssociationArgs) ElementType

func (AssociationArgs) ElementType() reflect.Type

type AssociationArray added in v3.25.0

type AssociationArray []AssociationInput

func (AssociationArray) ElementType added in v3.25.0

func (AssociationArray) ElementType() reflect.Type

func (AssociationArray) ToAssociationArrayOutput added in v3.25.0

func (i AssociationArray) ToAssociationArrayOutput() AssociationArrayOutput

func (AssociationArray) ToAssociationArrayOutputWithContext added in v3.25.0

func (i AssociationArray) ToAssociationArrayOutputWithContext(ctx context.Context) AssociationArrayOutput

type AssociationArrayInput added in v3.25.0

type AssociationArrayInput interface {
	pulumi.Input

	ToAssociationArrayOutput() AssociationArrayOutput
	ToAssociationArrayOutputWithContext(context.Context) AssociationArrayOutput
}

AssociationArrayInput is an input type that accepts AssociationArray and AssociationArrayOutput values. You can construct a concrete instance of `AssociationArrayInput` via:

AssociationArray{ AssociationArgs{...} }

type AssociationArrayOutput added in v3.25.0

type AssociationArrayOutput struct{ *pulumi.OutputState }

func (AssociationArrayOutput) ElementType added in v3.25.0

func (AssociationArrayOutput) ElementType() reflect.Type

func (AssociationArrayOutput) Index added in v3.25.0

func (AssociationArrayOutput) ToAssociationArrayOutput added in v3.25.0

func (o AssociationArrayOutput) ToAssociationArrayOutput() AssociationArrayOutput

func (AssociationArrayOutput) ToAssociationArrayOutputWithContext added in v3.25.0

func (o AssociationArrayOutput) ToAssociationArrayOutputWithContext(ctx context.Context) AssociationArrayOutput

type AssociationInput added in v3.13.0

type AssociationInput interface {
	pulumi.Input

	ToAssociationOutput() AssociationOutput
	ToAssociationOutputWithContext(ctx context.Context) AssociationOutput
}

type AssociationMap added in v3.25.0

type AssociationMap map[string]AssociationInput

func (AssociationMap) ElementType added in v3.25.0

func (AssociationMap) ElementType() reflect.Type

func (AssociationMap) ToAssociationMapOutput added in v3.25.0

func (i AssociationMap) ToAssociationMapOutput() AssociationMapOutput

func (AssociationMap) ToAssociationMapOutputWithContext added in v3.25.0

func (i AssociationMap) ToAssociationMapOutputWithContext(ctx context.Context) AssociationMapOutput

type AssociationMapInput added in v3.25.0

type AssociationMapInput interface {
	pulumi.Input

	ToAssociationMapOutput() AssociationMapOutput
	ToAssociationMapOutputWithContext(context.Context) AssociationMapOutput
}

AssociationMapInput is an input type that accepts AssociationMap and AssociationMapOutput values. You can construct a concrete instance of `AssociationMapInput` via:

AssociationMap{ "key": AssociationArgs{...} }

type AssociationMapOutput added in v3.25.0

type AssociationMapOutput struct{ *pulumi.OutputState }

func (AssociationMapOutput) ElementType added in v3.25.0

func (AssociationMapOutput) ElementType() reflect.Type

func (AssociationMapOutput) MapIndex added in v3.25.0

func (AssociationMapOutput) ToAssociationMapOutput added in v3.25.0

func (o AssociationMapOutput) ToAssociationMapOutput() AssociationMapOutput

func (AssociationMapOutput) ToAssociationMapOutputWithContext added in v3.25.0

func (o AssociationMapOutput) ToAssociationMapOutputWithContext(ctx context.Context) AssociationMapOutput

type AssociationOutput added in v3.13.0

type AssociationOutput struct {
	*pulumi.OutputState
}

func (AssociationOutput) ElementType added in v3.13.0

func (AssociationOutput) ElementType() reflect.Type

func (AssociationOutput) ToAssociationOutput added in v3.13.0

func (o AssociationOutput) ToAssociationOutput() AssociationOutput

func (AssociationOutput) ToAssociationOutputWithContext added in v3.13.0

func (o AssociationOutput) ToAssociationOutputWithContext(ctx context.Context) AssociationOutput

func (AssociationOutput) ToAssociationPtrOutput added in v3.25.0

func (o AssociationOutput) ToAssociationPtrOutput() AssociationPtrOutput

func (AssociationOutput) ToAssociationPtrOutputWithContext added in v3.25.0

func (o AssociationOutput) ToAssociationPtrOutputWithContext(ctx context.Context) AssociationPtrOutput

type AssociationPtrInput added in v3.25.0

type AssociationPtrInput interface {
	pulumi.Input

	ToAssociationPtrOutput() AssociationPtrOutput
	ToAssociationPtrOutputWithContext(ctx context.Context) AssociationPtrOutput
}

type AssociationPtrOutput added in v3.25.0

type AssociationPtrOutput struct {
	*pulumi.OutputState
}

func (AssociationPtrOutput) ElementType added in v3.25.0

func (AssociationPtrOutput) ElementType() reflect.Type

func (AssociationPtrOutput) ToAssociationPtrOutput added in v3.25.0

func (o AssociationPtrOutput) ToAssociationPtrOutput() AssociationPtrOutput

func (AssociationPtrOutput) ToAssociationPtrOutputWithContext added in v3.25.0

func (o AssociationPtrOutput) ToAssociationPtrOutputWithContext(ctx context.Context) AssociationPtrOutput

type AssociationState

type AssociationState struct {
	// ARN of the license configuration.
	LicenseConfigurationArn pulumi.StringPtrInput
	// ARN of the resource associated with the license configuration.
	ResourceArn pulumi.StringPtrInput
}

func (AssociationState) ElementType

func (AssociationState) ElementType() reflect.Type

type LicenseConfiguration

type LicenseConfiguration struct {
	pulumi.CustomResourceState

	// The license configuration ARN.
	Arn pulumi.StringOutput `pulumi:"arn"`
	// Description of the license configuration.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Number of licenses managed by the license configuration.
	LicenseCount pulumi.IntPtrOutput `pulumi:"licenseCount"`
	// Sets the number of available licenses as a hard limit.
	LicenseCountHardLimit pulumi.BoolPtrOutput `pulumi:"licenseCountHardLimit"`
	// Dimension to use to track license inventory. Specify either `vCPU`, `Instance`, `Core` or `Socket`.
	LicenseCountingType pulumi.StringOutput `pulumi:"licenseCountingType"`
	// Array of configured License Manager rules.
	LicenseRules pulumi.StringArrayOutput `pulumi:"licenseRules"`
	// Name of the license configuration.
	Name pulumi.StringOutput `pulumi:"name"`
	// Account ID of the owner of the license configuration.
	OwnerAccountId pulumi.StringOutput `pulumi:"ownerAccountId"`
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
}

Provides a License Manager license configuration resource.

> **Note:** Removing the `licenseCount` attribute is not supported by the License Manager API - recreate the resource instead.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/licensemanager"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := licensemanager.NewLicenseConfiguration(ctx, "example", &licensemanager.LicenseConfigurationArgs{
			Description:           pulumi.String("Example"),
			LicenseCount:          pulumi.Int(10),
			LicenseCountHardLimit: pulumi.Bool(true),
			LicenseCountingType:   pulumi.String("Socket"),
			LicenseRules: pulumi.StringArray{
				pulumi.String("#minimumSockets=2"),
			},
			Tags: pulumi.StringMap{
				"foo": pulumi.String("barr"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ## Rules

License rules should be in the format of `#RuleType=RuleValue`. Supported rule types:

* `minimumVcpus` - Resource must have minimum vCPU count in order to use the license. Default: 1 * `maximumVcpus` - Resource must have maximum vCPU count in order to use the license. Default: unbounded, limit: 10000 * `minimumCores` - Resource must have minimum core count in order to use the license. Default: 1 * `maximumCores` - Resource must have maximum core count in order to use the license. Default: unbounded, limit: 10000 * `minimumSockets` - Resource must have minimum socket count in order to use the license. Default: 1 * `maximumSockets` - Resource must have maximum socket count in order to use the license. Default: unbounded, limit: 10000 * `allowedTenancy` - Defines where the license can be used. If set, restricts license usage to selected tenancies. Specify a comma delimited list of `EC2-Default`, `EC2-DedicatedHost`, `EC2-DedicatedInstance`

## Import

License configurations can be imported using the `id`, e.g.

```sh

$ pulumi import aws:licensemanager/licenseConfiguration:LicenseConfiguration example arn:aws:license-manager:eu-west-1:123456789012:license-configuration:lic-0123456789abcdef0123456789abcdef

```

func GetLicenseConfiguration

func GetLicenseConfiguration(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *LicenseConfigurationState, opts ...pulumi.ResourceOption) (*LicenseConfiguration, error)

GetLicenseConfiguration gets an existing LicenseConfiguration resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewLicenseConfiguration

func NewLicenseConfiguration(ctx *pulumi.Context,
	name string, args *LicenseConfigurationArgs, opts ...pulumi.ResourceOption) (*LicenseConfiguration, error)

NewLicenseConfiguration registers a new resource with the given unique name, arguments, and options.

func (*LicenseConfiguration) ElementType added in v3.13.0

func (*LicenseConfiguration) ElementType() reflect.Type

func (*LicenseConfiguration) ToLicenseConfigurationOutput added in v3.13.0

func (i *LicenseConfiguration) ToLicenseConfigurationOutput() LicenseConfigurationOutput

func (*LicenseConfiguration) ToLicenseConfigurationOutputWithContext added in v3.13.0

func (i *LicenseConfiguration) ToLicenseConfigurationOutputWithContext(ctx context.Context) LicenseConfigurationOutput

func (*LicenseConfiguration) ToLicenseConfigurationPtrOutput added in v3.25.0

func (i *LicenseConfiguration) ToLicenseConfigurationPtrOutput() LicenseConfigurationPtrOutput

func (*LicenseConfiguration) ToLicenseConfigurationPtrOutputWithContext added in v3.25.0

func (i *LicenseConfiguration) ToLicenseConfigurationPtrOutputWithContext(ctx context.Context) LicenseConfigurationPtrOutput

type LicenseConfigurationArgs

type LicenseConfigurationArgs struct {
	// Description of the license configuration.
	Description pulumi.StringPtrInput
	// Number of licenses managed by the license configuration.
	LicenseCount pulumi.IntPtrInput
	// Sets the number of available licenses as a hard limit.
	LicenseCountHardLimit pulumi.BoolPtrInput
	// Dimension to use to track license inventory. Specify either `vCPU`, `Instance`, `Core` or `Socket`.
	LicenseCountingType pulumi.StringInput
	// Array of configured License Manager rules.
	LicenseRules pulumi.StringArrayInput
	// Name of the license configuration.
	Name pulumi.StringPtrInput
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapInput
}

The set of arguments for constructing a LicenseConfiguration resource.

func (LicenseConfigurationArgs) ElementType

func (LicenseConfigurationArgs) ElementType() reflect.Type

type LicenseConfigurationArray added in v3.25.0

type LicenseConfigurationArray []LicenseConfigurationInput

func (LicenseConfigurationArray) ElementType added in v3.25.0

func (LicenseConfigurationArray) ElementType() reflect.Type

func (LicenseConfigurationArray) ToLicenseConfigurationArrayOutput added in v3.25.0

func (i LicenseConfigurationArray) ToLicenseConfigurationArrayOutput() LicenseConfigurationArrayOutput

func (LicenseConfigurationArray) ToLicenseConfigurationArrayOutputWithContext added in v3.25.0

func (i LicenseConfigurationArray) ToLicenseConfigurationArrayOutputWithContext(ctx context.Context) LicenseConfigurationArrayOutput

type LicenseConfigurationArrayInput added in v3.25.0

type LicenseConfigurationArrayInput interface {
	pulumi.Input

	ToLicenseConfigurationArrayOutput() LicenseConfigurationArrayOutput
	ToLicenseConfigurationArrayOutputWithContext(context.Context) LicenseConfigurationArrayOutput
}

LicenseConfigurationArrayInput is an input type that accepts LicenseConfigurationArray and LicenseConfigurationArrayOutput values. You can construct a concrete instance of `LicenseConfigurationArrayInput` via:

LicenseConfigurationArray{ LicenseConfigurationArgs{...} }

type LicenseConfigurationArrayOutput added in v3.25.0

type LicenseConfigurationArrayOutput struct{ *pulumi.OutputState }

func (LicenseConfigurationArrayOutput) ElementType added in v3.25.0

func (LicenseConfigurationArrayOutput) Index added in v3.25.0

func (LicenseConfigurationArrayOutput) ToLicenseConfigurationArrayOutput added in v3.25.0

func (o LicenseConfigurationArrayOutput) ToLicenseConfigurationArrayOutput() LicenseConfigurationArrayOutput

func (LicenseConfigurationArrayOutput) ToLicenseConfigurationArrayOutputWithContext added in v3.25.0

func (o LicenseConfigurationArrayOutput) ToLicenseConfigurationArrayOutputWithContext(ctx context.Context) LicenseConfigurationArrayOutput

type LicenseConfigurationInput added in v3.13.0

type LicenseConfigurationInput interface {
	pulumi.Input

	ToLicenseConfigurationOutput() LicenseConfigurationOutput
	ToLicenseConfigurationOutputWithContext(ctx context.Context) LicenseConfigurationOutput
}

type LicenseConfigurationMap added in v3.25.0

type LicenseConfigurationMap map[string]LicenseConfigurationInput

func (LicenseConfigurationMap) ElementType added in v3.25.0

func (LicenseConfigurationMap) ElementType() reflect.Type

func (LicenseConfigurationMap) ToLicenseConfigurationMapOutput added in v3.25.0

func (i LicenseConfigurationMap) ToLicenseConfigurationMapOutput() LicenseConfigurationMapOutput

func (LicenseConfigurationMap) ToLicenseConfigurationMapOutputWithContext added in v3.25.0

func (i LicenseConfigurationMap) ToLicenseConfigurationMapOutputWithContext(ctx context.Context) LicenseConfigurationMapOutput

type LicenseConfigurationMapInput added in v3.25.0

type LicenseConfigurationMapInput interface {
	pulumi.Input

	ToLicenseConfigurationMapOutput() LicenseConfigurationMapOutput
	ToLicenseConfigurationMapOutputWithContext(context.Context) LicenseConfigurationMapOutput
}

LicenseConfigurationMapInput is an input type that accepts LicenseConfigurationMap and LicenseConfigurationMapOutput values. You can construct a concrete instance of `LicenseConfigurationMapInput` via:

LicenseConfigurationMap{ "key": LicenseConfigurationArgs{...} }

type LicenseConfigurationMapOutput added in v3.25.0

type LicenseConfigurationMapOutput struct{ *pulumi.OutputState }

func (LicenseConfigurationMapOutput) ElementType added in v3.25.0

func (LicenseConfigurationMapOutput) MapIndex added in v3.25.0

func (LicenseConfigurationMapOutput) ToLicenseConfigurationMapOutput added in v3.25.0

func (o LicenseConfigurationMapOutput) ToLicenseConfigurationMapOutput() LicenseConfigurationMapOutput

func (LicenseConfigurationMapOutput) ToLicenseConfigurationMapOutputWithContext added in v3.25.0

func (o LicenseConfigurationMapOutput) ToLicenseConfigurationMapOutputWithContext(ctx context.Context) LicenseConfigurationMapOutput

type LicenseConfigurationOutput added in v3.13.0

type LicenseConfigurationOutput struct {
	*pulumi.OutputState
}

func (LicenseConfigurationOutput) ElementType added in v3.13.0

func (LicenseConfigurationOutput) ElementType() reflect.Type

func (LicenseConfigurationOutput) ToLicenseConfigurationOutput added in v3.13.0

func (o LicenseConfigurationOutput) ToLicenseConfigurationOutput() LicenseConfigurationOutput

func (LicenseConfigurationOutput) ToLicenseConfigurationOutputWithContext added in v3.13.0

func (o LicenseConfigurationOutput) ToLicenseConfigurationOutputWithContext(ctx context.Context) LicenseConfigurationOutput

func (LicenseConfigurationOutput) ToLicenseConfigurationPtrOutput added in v3.25.0

func (o LicenseConfigurationOutput) ToLicenseConfigurationPtrOutput() LicenseConfigurationPtrOutput

func (LicenseConfigurationOutput) ToLicenseConfigurationPtrOutputWithContext added in v3.25.0

func (o LicenseConfigurationOutput) ToLicenseConfigurationPtrOutputWithContext(ctx context.Context) LicenseConfigurationPtrOutput

type LicenseConfigurationPtrInput added in v3.25.0

type LicenseConfigurationPtrInput interface {
	pulumi.Input

	ToLicenseConfigurationPtrOutput() LicenseConfigurationPtrOutput
	ToLicenseConfigurationPtrOutputWithContext(ctx context.Context) LicenseConfigurationPtrOutput
}

type LicenseConfigurationPtrOutput added in v3.25.0

type LicenseConfigurationPtrOutput struct {
	*pulumi.OutputState
}

func (LicenseConfigurationPtrOutput) ElementType added in v3.25.0

func (LicenseConfigurationPtrOutput) ToLicenseConfigurationPtrOutput added in v3.25.0

func (o LicenseConfigurationPtrOutput) ToLicenseConfigurationPtrOutput() LicenseConfigurationPtrOutput

func (LicenseConfigurationPtrOutput) ToLicenseConfigurationPtrOutputWithContext added in v3.25.0

func (o LicenseConfigurationPtrOutput) ToLicenseConfigurationPtrOutputWithContext(ctx context.Context) LicenseConfigurationPtrOutput

type LicenseConfigurationState

type LicenseConfigurationState struct {
	// The license configuration ARN.
	Arn pulumi.StringPtrInput
	// Description of the license configuration.
	Description pulumi.StringPtrInput
	// Number of licenses managed by the license configuration.
	LicenseCount pulumi.IntPtrInput
	// Sets the number of available licenses as a hard limit.
	LicenseCountHardLimit pulumi.BoolPtrInput
	// Dimension to use to track license inventory. Specify either `vCPU`, `Instance`, `Core` or `Socket`.
	LicenseCountingType pulumi.StringPtrInput
	// Array of configured License Manager rules.
	LicenseRules pulumi.StringArrayInput
	// Name of the license configuration.
	Name pulumi.StringPtrInput
	// Account ID of the owner of the license configuration.
	OwnerAccountId pulumi.StringPtrInput
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapInput
}

func (LicenseConfigurationState) ElementType

func (LicenseConfigurationState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL