# TagOptionsProps

Properties for TagOptions.

Used as props by: [TagOptions](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_servicecatalog.TagOptions.html)

- Source: [`aws-servicecatalog/lib/tag-options.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-servicecatalog/lib/tag-options.ts#L14)
- Type last changed: v2.23.0 · 4 May 2022

## Example

TypeScript:

```ts
declare const portfolio: servicecatalog.Portfolio;
declare const product: servicecatalog.CloudFormationProduct;

const tagOptionsForPortfolio = new servicecatalog.TagOptions(this, 'OrgTagOptions', {
  allowedValuesForTags: {
    Group: ['finance', 'engineering', 'marketing', 'research'],
    CostCenter: ['01', '02','03'],
  },
});
portfolio.associateTagOptions(tagOptionsForPortfolio);

const tagOptionsForProduct = new servicecatalog.TagOptions(this, 'ProductTagOptions', {
  allowedValuesForTags: {
    Environment: ['dev', 'alpha', 'prod'],
  },
});
product.associateTagOptions(tagOptionsForProduct);
```

Python:

```python
# portfolio: servicecatalog.Portfolio
# product: servicecatalog.CloudFormationProduct

tag_options_for_portfolio = servicecatalog.TagOptions(self, "OrgTagOptions",
    allowed_values_for_tags={
        "Group": ["finance", "engineering", "marketing", "research"],
        "CostCenter": ["01", "02", "03"]
    }
)
portfolio.associate_tag_options(tag_options_for_portfolio)

tag_options_for_product = servicecatalog.TagOptions(self, "ProductTagOptions",
    allowed_values_for_tags={
        "Environment": ["dev", "alpha", "prod"]
    }
)
product.associate_tag_options(tag_options_for_product)
```

Java:

```java
Portfolio portfolio;
CloudFormationProduct product;

TagOptions tagOptionsForPortfolio = TagOptions.Builder.create(this, "OrgTagOptions")
        .allowedValuesForTags(Map.of(
                "Group", List.of("finance", "engineering", "marketing", "research"),
                "CostCenter", List.of("01", "02", "03")))
        .build();
portfolio.associateTagOptions(tagOptionsForPortfolio);

TagOptions tagOptionsForProduct = TagOptions.Builder.create(this, "ProductTagOptions")
        .allowedValuesForTags(Map.of(
                "Environment", List.of("dev", "alpha", "prod")))
        .build();
product.associateTagOptions(tagOptionsForProduct);
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
Portfolio portfolio;
CloudFormationProduct product;

var tagOptionsForPortfolio = new TagOptions(this, "OrgTagOptions", new TagOptionsProps {
    AllowedValuesForTags = new Dictionary<string, string[]> {
        { "Group", new [] { "finance", "engineering", "marketing", "research" } },
        { "CostCenter", new [] { "01", "02", "03" } }
    }
});
portfolio.AssociateTagOptions(tagOptionsForPortfolio);

var tagOptionsForProduct = new TagOptions(this, "ProductTagOptions", new TagOptionsProps {
    AllowedValuesForTags = new Dictionary<string, string[]> {
        { "Environment", new [] { "dev", "alpha", "prod" } }
    }
});
product.AssociateTagOptions(tagOptionsForProduct);
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var portfolio Portfolio
var product CloudFormationProduct

tagOptionsForPortfolio := servicecatalog.NewTagOptions(this, jsii.String("OrgTagOptions"), &TagOptionsProps{
	AllowedValuesForTags: map[string][]*string{
		"Group": []*string{
			jsii.String("finance"),
			jsii.String("engineering"),
			jsii.String("marketing"),
			jsii.String("research"),
		},
		"CostCenter": []*string{
			jsii.String("01"),
			jsii.String("02"),
			jsii.String("03"),
		},
	},
})
portfolio.associateTagOptions(tagOptionsForPortfolio)

tagOptionsForProduct := servicecatalog.NewTagOptions(this, jsii.String("ProductTagOptions"), &TagOptionsProps{
	AllowedValuesForTags: map[string][]*string{
		"Environment": []*string{
			jsii.String("dev"),
			jsii.String("alpha"),
			jsii.String("prod"),
		},
	},
})
product.associateTagOptions(tagOptionsForProduct)
```

## Properties

- `allowedValuesForTags`: { [key: string]: string[] } (required) — The values that are allowed to be set for specific tags.

  The keys of the map represent the tag keys,
  and the values of the map are a list of allowed values for that particular tag key.
