1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ServiceCatalog
  5. CatalogAssociation
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

oci.ServiceCatalog.CatalogAssociation

Explore with Pulumi AI

This resource provides the Service Catalog Association resource in Oracle Cloud Infrastructure Service Catalog service.

Creates an association between service catalog and a resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testServiceCatalogAssociation = new oci.servicecatalog.CatalogAssociation("test_service_catalog_association", {
    entityId: testEntity.id,
    serviceCatalogId: testServiceCatalog.id,
    entityType: serviceCatalogAssociationEntityType,
});
Copy
import pulumi
import pulumi_oci as oci

test_service_catalog_association = oci.service_catalog.CatalogAssociation("test_service_catalog_association",
    entity_id=test_entity["id"],
    service_catalog_id=test_service_catalog["id"],
    entity_type=service_catalog_association_entity_type)
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/servicecatalog"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := servicecatalog.NewCatalogAssociation(ctx, "test_service_catalog_association", &servicecatalog.CatalogAssociationArgs{
			EntityId:         pulumi.Any(testEntity.Id),
			ServiceCatalogId: pulumi.Any(testServiceCatalog.Id),
			EntityType:       pulumi.Any(serviceCatalogAssociationEntityType),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testServiceCatalogAssociation = new Oci.ServiceCatalog.CatalogAssociation("test_service_catalog_association", new()
    {
        EntityId = testEntity.Id,
        ServiceCatalogId = testServiceCatalog.Id,
        EntityType = serviceCatalogAssociationEntityType,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.ServiceCatalog.CatalogAssociation;
import com.pulumi.oci.ServiceCatalog.CatalogAssociationArgs;
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 testServiceCatalogAssociation = new CatalogAssociation("testServiceCatalogAssociation", CatalogAssociationArgs.builder()
            .entityId(testEntity.id())
            .serviceCatalogId(testServiceCatalog.id())
            .entityType(serviceCatalogAssociationEntityType)
            .build());

    }
}
Copy
resources:
  testServiceCatalogAssociation:
    type: oci:ServiceCatalog:CatalogAssociation
    name: test_service_catalog_association
    properties:
      entityId: ${testEntity.id}
      serviceCatalogId: ${testServiceCatalog.id}
      entityType: ${serviceCatalogAssociationEntityType}
Copy

Create CatalogAssociation Resource

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

Constructor syntax

new CatalogAssociation(name: string, args: CatalogAssociationArgs, opts?: CustomResourceOptions);
@overload
def CatalogAssociation(resource_name: str,
                       args: CatalogAssociationArgs,
                       opts: Optional[ResourceOptions] = None)

@overload
def CatalogAssociation(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       entity_id: Optional[str] = None,
                       service_catalog_id: Optional[str] = None,
                       entity_type: Optional[str] = None)
func NewCatalogAssociation(ctx *Context, name string, args CatalogAssociationArgs, opts ...ResourceOption) (*CatalogAssociation, error)
public CatalogAssociation(string name, CatalogAssociationArgs args, CustomResourceOptions? opts = null)
public CatalogAssociation(String name, CatalogAssociationArgs args)
public CatalogAssociation(String name, CatalogAssociationArgs args, CustomResourceOptions options)
type: oci:ServiceCatalog:CatalogAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. CatalogAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. CatalogAssociationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. CatalogAssociationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CatalogAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CatalogAssociationArgs
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 catalogAssociationResource = new Oci.ServiceCatalog.CatalogAssociation("catalogAssociationResource", new()
{
    EntityId = "string",
    ServiceCatalogId = "string",
    EntityType = "string",
});
Copy
example, err := ServiceCatalog.NewCatalogAssociation(ctx, "catalogAssociationResource", &ServiceCatalog.CatalogAssociationArgs{
	EntityId:         pulumi.String("string"),
	ServiceCatalogId: pulumi.String("string"),
	EntityType:       pulumi.String("string"),
})
Copy
var catalogAssociationResource = new CatalogAssociation("catalogAssociationResource", CatalogAssociationArgs.builder()
    .entityId("string")
    .serviceCatalogId("string")
    .entityType("string")
    .build());
Copy
catalog_association_resource = oci.service_catalog.CatalogAssociation("catalogAssociationResource",
    entity_id="string",
    service_catalog_id="string",
    entity_type="string")
Copy
const catalogAssociationResource = new oci.servicecatalog.CatalogAssociation("catalogAssociationResource", {
    entityId: "string",
    serviceCatalogId: "string",
    entityType: "string",
});
Copy
type: oci:ServiceCatalog:CatalogAssociation
properties:
    entityId: string
    entityType: string
    serviceCatalogId: string
Copy

CatalogAssociation 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 CatalogAssociation resource accepts the following input properties:

EntityId
This property is required.
Changes to this property will trigger replacement.
string
Identifier of the entity being associated with service catalog.
ServiceCatalogId
This property is required.
Changes to this property will trigger replacement.
string

Identifier of the service catalog.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

EntityType Changes to this property will trigger replacement. string
The type of the entity that is associated with the service catalog.
EntityId
This property is required.
Changes to this property will trigger replacement.
string
Identifier of the entity being associated with service catalog.
ServiceCatalogId
This property is required.
Changes to this property will trigger replacement.
string

Identifier of the service catalog.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

EntityType Changes to this property will trigger replacement. string
The type of the entity that is associated with the service catalog.
entityId
This property is required.
Changes to this property will trigger replacement.
String
Identifier of the entity being associated with service catalog.
serviceCatalogId
This property is required.
Changes to this property will trigger replacement.
String

Identifier of the service catalog.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

entityType Changes to this property will trigger replacement. String
The type of the entity that is associated with the service catalog.
entityId
This property is required.
Changes to this property will trigger replacement.
string
Identifier of the entity being associated with service catalog.
serviceCatalogId
This property is required.
Changes to this property will trigger replacement.
string

Identifier of the service catalog.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

entityType Changes to this property will trigger replacement. string
The type of the entity that is associated with the service catalog.
entity_id
This property is required.
Changes to this property will trigger replacement.
str
Identifier of the entity being associated with service catalog.
service_catalog_id
This property is required.
Changes to this property will trigger replacement.
str

Identifier of the service catalog.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

entity_type Changes to this property will trigger replacement. str
The type of the entity that is associated with the service catalog.
entityId
This property is required.
Changes to this property will trigger replacement.
String
Identifier of the entity being associated with service catalog.
serviceCatalogId
This property is required.
Changes to this property will trigger replacement.
String

Identifier of the service catalog.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

entityType Changes to this property will trigger replacement. String
The type of the entity that is associated with the service catalog.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
TimeCreated string
Timestamp of when the resource was associated with service catalog.
Id string
The provider-assigned unique ID for this managed resource.
TimeCreated string
Timestamp of when the resource was associated with service catalog.
id String
The provider-assigned unique ID for this managed resource.
timeCreated String
Timestamp of when the resource was associated with service catalog.
id string
The provider-assigned unique ID for this managed resource.
timeCreated string
Timestamp of when the resource was associated with service catalog.
id str
The provider-assigned unique ID for this managed resource.
time_created str
Timestamp of when the resource was associated with service catalog.
id String
The provider-assigned unique ID for this managed resource.
timeCreated String
Timestamp of when the resource was associated with service catalog.

Look up Existing CatalogAssociation Resource

Get an existing CatalogAssociation 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?: CatalogAssociationState, opts?: CustomResourceOptions): CatalogAssociation
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        entity_id: Optional[str] = None,
        entity_type: Optional[str] = None,
        service_catalog_id: Optional[str] = None,
        time_created: Optional[str] = None) -> CatalogAssociation
func GetCatalogAssociation(ctx *Context, name string, id IDInput, state *CatalogAssociationState, opts ...ResourceOption) (*CatalogAssociation, error)
public static CatalogAssociation Get(string name, Input<string> id, CatalogAssociationState? state, CustomResourceOptions? opts = null)
public static CatalogAssociation get(String name, Output<String> id, CatalogAssociationState state, CustomResourceOptions options)
resources:  _:    type: oci:ServiceCatalog:CatalogAssociation    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
EntityId Changes to this property will trigger replacement. string
Identifier of the entity being associated with service catalog.
EntityType Changes to this property will trigger replacement. string
The type of the entity that is associated with the service catalog.
ServiceCatalogId Changes to this property will trigger replacement. string

Identifier of the service catalog.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

TimeCreated string
Timestamp of when the resource was associated with service catalog.
EntityId Changes to this property will trigger replacement. string
Identifier of the entity being associated with service catalog.
EntityType Changes to this property will trigger replacement. string
The type of the entity that is associated with the service catalog.
ServiceCatalogId Changes to this property will trigger replacement. string

Identifier of the service catalog.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

TimeCreated string
Timestamp of when the resource was associated with service catalog.
entityId Changes to this property will trigger replacement. String
Identifier of the entity being associated with service catalog.
entityType Changes to this property will trigger replacement. String
The type of the entity that is associated with the service catalog.
serviceCatalogId Changes to this property will trigger replacement. String

Identifier of the service catalog.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

timeCreated String
Timestamp of when the resource was associated with service catalog.
entityId Changes to this property will trigger replacement. string
Identifier of the entity being associated with service catalog.
entityType Changes to this property will trigger replacement. string
The type of the entity that is associated with the service catalog.
serviceCatalogId Changes to this property will trigger replacement. string

Identifier of the service catalog.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

timeCreated string
Timestamp of when the resource was associated with service catalog.
entity_id Changes to this property will trigger replacement. str
Identifier of the entity being associated with service catalog.
entity_type Changes to this property will trigger replacement. str
The type of the entity that is associated with the service catalog.
service_catalog_id Changes to this property will trigger replacement. str

Identifier of the service catalog.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

time_created str
Timestamp of when the resource was associated with service catalog.
entityId Changes to this property will trigger replacement. String
Identifier of the entity being associated with service catalog.
entityType Changes to this property will trigger replacement. String
The type of the entity that is associated with the service catalog.
serviceCatalogId Changes to this property will trigger replacement. String

Identifier of the service catalog.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

timeCreated String
Timestamp of when the resource was associated with service catalog.

Import

ServiceCatalogAssociations can be imported using the id, e.g.

$ pulumi import oci:ServiceCatalog/catalogAssociation:CatalogAssociation test_service_catalog_association "id"
Copy

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

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.