licensemanager

package
v4.38.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 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/v4/go/aws/ec2"
"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/licensemanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleAmi, err := ec2.LookupAmi(ctx, &ec2.LookupAmiArgs{
			MostRecent: pulumi.BoolRef(true),
			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

func (*Association) ElementType() reflect.Type

func (*Association) ToAssociationOutput

func (i *Association) ToAssociationOutput() AssociationOutput

func (*Association) ToAssociationOutputWithContext

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

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

type AssociationArray []AssociationInput

func (AssociationArray) ElementType

func (AssociationArray) ElementType() reflect.Type

func (AssociationArray) ToAssociationArrayOutput

func (i AssociationArray) ToAssociationArrayOutput() AssociationArrayOutput

func (AssociationArray) ToAssociationArrayOutputWithContext

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

type AssociationArrayInput

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

type AssociationArrayOutput struct{ *pulumi.OutputState }

func (AssociationArrayOutput) ElementType

func (AssociationArrayOutput) ElementType() reflect.Type

func (AssociationArrayOutput) Index

func (AssociationArrayOutput) ToAssociationArrayOutput

func (o AssociationArrayOutput) ToAssociationArrayOutput() AssociationArrayOutput

func (AssociationArrayOutput) ToAssociationArrayOutputWithContext

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

type AssociationInput

type AssociationInput interface {
	pulumi.Input

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

type AssociationMap

type AssociationMap map[string]AssociationInput

func (AssociationMap) ElementType

func (AssociationMap) ElementType() reflect.Type

func (AssociationMap) ToAssociationMapOutput

func (i AssociationMap) ToAssociationMapOutput() AssociationMapOutput

func (AssociationMap) ToAssociationMapOutputWithContext

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

type AssociationMapInput

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

type AssociationMapOutput struct{ *pulumi.OutputState }

func (AssociationMapOutput) ElementType

func (AssociationMapOutput) ElementType() reflect.Type

func (AssociationMapOutput) MapIndex

func (AssociationMapOutput) ToAssociationMapOutput

func (o AssociationMapOutput) ToAssociationMapOutput() AssociationMapOutput

func (AssociationMapOutput) ToAssociationMapOutputWithContext

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

type AssociationOutput

type AssociationOutput struct{ *pulumi.OutputState }

func (AssociationOutput) ElementType

func (AssociationOutput) ElementType() reflect.Type

func (AssociationOutput) ToAssociationOutput

func (o AssociationOutput) ToAssociationOutput() AssociationOutput

func (AssociationOutput) ToAssociationOutputWithContext

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

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. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
	// A map of tags assigned to the resource, including those inherited from the provider .
	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
}

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/v4/go/aws/licensemanager"
"github.com/pulumi/pulumi/sdk/v3/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

func (*LicenseConfiguration) ElementType() reflect.Type

func (*LicenseConfiguration) ToLicenseConfigurationOutput

func (i *LicenseConfiguration) ToLicenseConfigurationOutput() LicenseConfigurationOutput

func (*LicenseConfiguration) ToLicenseConfigurationOutputWithContext

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

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. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
	Tags pulumi.StringMapInput
}

The set of arguments for constructing a LicenseConfiguration resource.

func (LicenseConfigurationArgs) ElementType

func (LicenseConfigurationArgs) ElementType() reflect.Type

type LicenseConfigurationArray

type LicenseConfigurationArray []LicenseConfigurationInput

func (LicenseConfigurationArray) ElementType

func (LicenseConfigurationArray) ElementType() reflect.Type

func (LicenseConfigurationArray) ToLicenseConfigurationArrayOutput

func (i LicenseConfigurationArray) ToLicenseConfigurationArrayOutput() LicenseConfigurationArrayOutput

func (LicenseConfigurationArray) ToLicenseConfigurationArrayOutputWithContext

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

type LicenseConfigurationArrayInput

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

type LicenseConfigurationArrayOutput struct{ *pulumi.OutputState }

func (LicenseConfigurationArrayOutput) ElementType

func (LicenseConfigurationArrayOutput) Index

func (LicenseConfigurationArrayOutput) ToLicenseConfigurationArrayOutput

func (o LicenseConfigurationArrayOutput) ToLicenseConfigurationArrayOutput() LicenseConfigurationArrayOutput

func (LicenseConfigurationArrayOutput) ToLicenseConfigurationArrayOutputWithContext

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

type LicenseConfigurationInput

type LicenseConfigurationInput interface {
	pulumi.Input

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

type LicenseConfigurationMap

type LicenseConfigurationMap map[string]LicenseConfigurationInput

func (LicenseConfigurationMap) ElementType

func (LicenseConfigurationMap) ElementType() reflect.Type

func (LicenseConfigurationMap) ToLicenseConfigurationMapOutput

func (i LicenseConfigurationMap) ToLicenseConfigurationMapOutput() LicenseConfigurationMapOutput

func (LicenseConfigurationMap) ToLicenseConfigurationMapOutputWithContext

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

type LicenseConfigurationMapInput

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

type LicenseConfigurationMapOutput struct{ *pulumi.OutputState }

func (LicenseConfigurationMapOutput) ElementType

func (LicenseConfigurationMapOutput) MapIndex

func (LicenseConfigurationMapOutput) ToLicenseConfigurationMapOutput

func (o LicenseConfigurationMapOutput) ToLicenseConfigurationMapOutput() LicenseConfigurationMapOutput

func (LicenseConfigurationMapOutput) ToLicenseConfigurationMapOutputWithContext

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

type LicenseConfigurationOutput

type LicenseConfigurationOutput struct{ *pulumi.OutputState }

func (LicenseConfigurationOutput) ElementType

func (LicenseConfigurationOutput) ElementType() reflect.Type

func (LicenseConfigurationOutput) ToLicenseConfigurationOutput

func (o LicenseConfigurationOutput) ToLicenseConfigurationOutput() LicenseConfigurationOutput

func (LicenseConfigurationOutput) ToLicenseConfigurationOutputWithContext

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

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. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
	Tags pulumi.StringMapInput
	// A map of tags assigned to the resource, including those inherited from the provider .
	TagsAll 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