1. Packages
  2. AWS
  3. API Docs
  4. servicecatalog
  5. AppregistryAttributeGroupAssociation
AWS v6.66.3 published on Monday, Jan 13, 2025 by Pulumi

aws.servicecatalog.AppregistryAttributeGroupAssociation

Explore with Pulumi AI

aws logo
AWS v6.66.3 published on Monday, Jan 13, 2025 by Pulumi

    Resource for managing an AWS Service Catalog AppRegistry Attribute Group Association.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.servicecatalog.AppregistryApplication("example", {name: "example-app"});
    const exampleAppregistryAttributeGroup = new aws.servicecatalog.AppregistryAttributeGroup("example", {
        name: "example",
        description: "example description",
        attributes: JSON.stringify({
            app: "exampleapp",
            group: "examplegroup",
        }),
    });
    const exampleAppregistryAttributeGroupAssociation = new aws.servicecatalog.AppregistryAttributeGroupAssociation("example", {
        applicationId: example.id,
        attributeGroupId: exampleAppregistryAttributeGroup.id,
    });
    
    import pulumi
    import json
    import pulumi_aws as aws
    
    example = aws.servicecatalog.AppregistryApplication("example", name="example-app")
    example_appregistry_attribute_group = aws.servicecatalog.AppregistryAttributeGroup("example",
        name="example",
        description="example description",
        attributes=json.dumps({
            "app": "exampleapp",
            "group": "examplegroup",
        }))
    example_appregistry_attribute_group_association = aws.servicecatalog.AppregistryAttributeGroupAssociation("example",
        application_id=example.id,
        attribute_group_id=example_appregistry_attribute_group.id)
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/servicecatalog"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := servicecatalog.NewAppregistryApplication(ctx, "example", &servicecatalog.AppregistryApplicationArgs{
    			Name: pulumi.String("example-app"),
    		})
    		if err != nil {
    			return err
    		}
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"app":   "exampleapp",
    			"group": "examplegroup",
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		exampleAppregistryAttributeGroup, err := servicecatalog.NewAppregistryAttributeGroup(ctx, "example", &servicecatalog.AppregistryAttributeGroupArgs{
    			Name:        pulumi.String("example"),
    			Description: pulumi.String("example description"),
    			Attributes:  pulumi.String(json0),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = servicecatalog.NewAppregistryAttributeGroupAssociation(ctx, "example", &servicecatalog.AppregistryAttributeGroupAssociationArgs{
    			ApplicationId:    example.ID(),
    			AttributeGroupId: exampleAppregistryAttributeGroup.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.ServiceCatalog.AppregistryApplication("example", new()
        {
            Name = "example-app",
        });
    
        var exampleAppregistryAttributeGroup = new Aws.ServiceCatalog.AppregistryAttributeGroup("example", new()
        {
            Name = "example",
            Description = "example description",
            Attributes = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["app"] = "exampleapp",
                ["group"] = "examplegroup",
            }),
        });
    
        var exampleAppregistryAttributeGroupAssociation = new Aws.ServiceCatalog.AppregistryAttributeGroupAssociation("example", new()
        {
            ApplicationId = example.Id,
            AttributeGroupId = exampleAppregistryAttributeGroup.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.servicecatalog.AppregistryApplication;
    import com.pulumi.aws.servicecatalog.AppregistryApplicationArgs;
    import com.pulumi.aws.servicecatalog.AppregistryAttributeGroup;
    import com.pulumi.aws.servicecatalog.AppregistryAttributeGroupArgs;
    import com.pulumi.aws.servicecatalog.AppregistryAttributeGroupAssociation;
    import com.pulumi.aws.servicecatalog.AppregistryAttributeGroupAssociationArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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 example = new AppregistryApplication("example", AppregistryApplicationArgs.builder()
                .name("example-app")
                .build());
    
            var exampleAppregistryAttributeGroup = new AppregistryAttributeGroup("exampleAppregistryAttributeGroup", AppregistryAttributeGroupArgs.builder()
                .name("example")
                .description("example description")
                .attributes(serializeJson(
                    jsonObject(
                        jsonProperty("app", "exampleapp"),
                        jsonProperty("group", "examplegroup")
                    )))
                .build());
    
            var exampleAppregistryAttributeGroupAssociation = new AppregistryAttributeGroupAssociation("exampleAppregistryAttributeGroupAssociation", AppregistryAttributeGroupAssociationArgs.builder()
                .applicationId(example.id())
                .attributeGroupId(exampleAppregistryAttributeGroup.id())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:servicecatalog:AppregistryApplication
        properties:
          name: example-app
      exampleAppregistryAttributeGroup:
        type: aws:servicecatalog:AppregistryAttributeGroup
        name: example
        properties:
          name: example
          description: example description
          attributes:
            fn::toJSON:
              app: exampleapp
              group: examplegroup
      exampleAppregistryAttributeGroupAssociation:
        type: aws:servicecatalog:AppregistryAttributeGroupAssociation
        name: example
        properties:
          applicationId: ${example.id}
          attributeGroupId: ${exampleAppregistryAttributeGroup.id}
    

    Create AppregistryAttributeGroupAssociation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AppregistryAttributeGroupAssociation(name: string, args: AppregistryAttributeGroupAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def AppregistryAttributeGroupAssociation(resource_name: str,
                                             args: AppregistryAttributeGroupAssociationArgs,
                                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def AppregistryAttributeGroupAssociation(resource_name: str,
                                             opts: Optional[ResourceOptions] = None,
                                             application_id: Optional[str] = None,
                                             attribute_group_id: Optional[str] = None)
    func NewAppregistryAttributeGroupAssociation(ctx *Context, name string, args AppregistryAttributeGroupAssociationArgs, opts ...ResourceOption) (*AppregistryAttributeGroupAssociation, error)
    public AppregistryAttributeGroupAssociation(string name, AppregistryAttributeGroupAssociationArgs args, CustomResourceOptions? opts = null)
    public AppregistryAttributeGroupAssociation(String name, AppregistryAttributeGroupAssociationArgs args)
    public AppregistryAttributeGroupAssociation(String name, AppregistryAttributeGroupAssociationArgs args, CustomResourceOptions options)
    
    type: aws:servicecatalog:AppregistryAttributeGroupAssociation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AppregistryAttributeGroupAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AppregistryAttributeGroupAssociationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AppregistryAttributeGroupAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AppregistryAttributeGroupAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AppregistryAttributeGroupAssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var appregistryAttributeGroupAssociationResource = new Aws.ServiceCatalog.AppregistryAttributeGroupAssociation("appregistryAttributeGroupAssociationResource", new()
    {
        ApplicationId = "string",
        AttributeGroupId = "string",
    });
    
    example, err := servicecatalog.NewAppregistryAttributeGroupAssociation(ctx, "appregistryAttributeGroupAssociationResource", &servicecatalog.AppregistryAttributeGroupAssociationArgs{
    	ApplicationId:    pulumi.String("string"),
    	AttributeGroupId: pulumi.String("string"),
    })
    
    var appregistryAttributeGroupAssociationResource = new AppregistryAttributeGroupAssociation("appregistryAttributeGroupAssociationResource", AppregistryAttributeGroupAssociationArgs.builder()
        .applicationId("string")
        .attributeGroupId("string")
        .build());
    
    appregistry_attribute_group_association_resource = aws.servicecatalog.AppregistryAttributeGroupAssociation("appregistryAttributeGroupAssociationResource",
        application_id="string",
        attribute_group_id="string")
    
    const appregistryAttributeGroupAssociationResource = new aws.servicecatalog.AppregistryAttributeGroupAssociation("appregistryAttributeGroupAssociationResource", {
        applicationId: "string",
        attributeGroupId: "string",
    });
    
    type: aws:servicecatalog:AppregistryAttributeGroupAssociation
    properties:
        applicationId: string
        attributeGroupId: string
    

    AppregistryAttributeGroupAssociation Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The AppregistryAttributeGroupAssociation resource accepts the following input properties:

    ApplicationId string
    ID of the application.
    AttributeGroupId string
    ID of the attribute group to associate with the application.
    ApplicationId string
    ID of the application.
    AttributeGroupId string
    ID of the attribute group to associate with the application.
    applicationId String
    ID of the application.
    attributeGroupId String
    ID of the attribute group to associate with the application.
    applicationId string
    ID of the application.
    attributeGroupId string
    ID of the attribute group to associate with the application.
    application_id str
    ID of the application.
    attribute_group_id str
    ID of the attribute group to associate with the application.
    applicationId String
    ID of the application.
    attributeGroupId String
    ID of the attribute group to associate with the application.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AppregistryAttributeGroupAssociation resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AppregistryAttributeGroupAssociation Resource

    Get an existing AppregistryAttributeGroupAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AppregistryAttributeGroupAssociationState, opts?: CustomResourceOptions): AppregistryAttributeGroupAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            application_id: Optional[str] = None,
            attribute_group_id: Optional[str] = None) -> AppregistryAttributeGroupAssociation
    func GetAppregistryAttributeGroupAssociation(ctx *Context, name string, id IDInput, state *AppregistryAttributeGroupAssociationState, opts ...ResourceOption) (*AppregistryAttributeGroupAssociation, error)
    public static AppregistryAttributeGroupAssociation Get(string name, Input<string> id, AppregistryAttributeGroupAssociationState? state, CustomResourceOptions? opts = null)
    public static AppregistryAttributeGroupAssociation get(String name, Output<String> id, AppregistryAttributeGroupAssociationState state, CustomResourceOptions options)
    resources:  _:    type: aws:servicecatalog:AppregistryAttributeGroupAssociation    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ApplicationId string
    ID of the application.
    AttributeGroupId string
    ID of the attribute group to associate with the application.
    ApplicationId string
    ID of the application.
    AttributeGroupId string
    ID of the attribute group to associate with the application.
    applicationId String
    ID of the application.
    attributeGroupId String
    ID of the attribute group to associate with the application.
    applicationId string
    ID of the application.
    attributeGroupId string
    ID of the attribute group to associate with the application.
    application_id str
    ID of the application.
    attribute_group_id str
    ID of the attribute group to associate with the application.
    applicationId String
    ID of the application.
    attributeGroupId String
    ID of the attribute group to associate with the application.

    Import

    Using pulumi import, import Service Catalog AppRegistry Attribute Group Association using application_id and attribute_group_id arguments separated by a comma (,). For example:

    $ pulumi import aws:servicecatalog/appregistryAttributeGroupAssociation:AppregistryAttributeGroupAssociation example 12456778723424sdffsdfsdq34,12234t3564dsfsdf34asff4ww3
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.66.3 published on Monday, Jan 13, 2025 by Pulumi