Oracle Cloud Infrastructure v2.27.0 published on Thursday, Mar 20, 2025 by Pulumi
oci.CertificatesManagement.getAssociations
Explore with Pulumi AI
This data source provides the list of Associations in Oracle Cloud Infrastructure Certificates Management service.
Lists all associations that match the query parameters.
Optionally, you can use the parameter FilterByAssociationIdQueryParam to limit the result set to a single item that matches the specified association.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testAssociations = oci.CertificatesManagement.getAssociations({
    associatedResourceId: testAssociatedResource.id,
    associationId: testAssociation.id,
    associationType: associationAssociationType,
    certificatesResourceId: testCertificatesResource.id,
    compartmentId: compartmentId,
    name: associationName,
});
import pulumi
import pulumi_oci as oci
test_associations = oci.CertificatesManagement.get_associations(associated_resource_id=test_associated_resource["id"],
    association_id=test_association["id"],
    association_type=association_association_type,
    certificates_resource_id=test_certificates_resource["id"],
    compartment_id=compartment_id,
    name=association_name)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/certificatesmanagement"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := certificatesmanagement.GetAssociations(ctx, &certificatesmanagement.GetAssociationsArgs{
			AssociatedResourceId:   pulumi.StringRef(testAssociatedResource.Id),
			AssociationId:          pulumi.StringRef(testAssociation.Id),
			AssociationType:        pulumi.StringRef(associationAssociationType),
			CertificatesResourceId: pulumi.StringRef(testCertificatesResource.Id),
			CompartmentId:          pulumi.StringRef(compartmentId),
			Name:                   pulumi.StringRef(associationName),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() => 
{
    var testAssociations = Oci.CertificatesManagement.GetAssociations.Invoke(new()
    {
        AssociatedResourceId = testAssociatedResource.Id,
        AssociationId = testAssociation.Id,
        AssociationType = associationAssociationType,
        CertificatesResourceId = testCertificatesResource.Id,
        CompartmentId = compartmentId,
        Name = associationName,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.CertificatesManagement.CertificatesManagementFunctions;
import com.pulumi.oci.CertificatesManagement.inputs.GetAssociationsArgs;
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) {
        final var testAssociations = CertificatesManagementFunctions.getAssociations(GetAssociationsArgs.builder()
            .associatedResourceId(testAssociatedResource.id())
            .associationId(testAssociation.id())
            .associationType(associationAssociationType)
            .certificatesResourceId(testCertificatesResource.id())
            .compartmentId(compartmentId)
            .name(associationName)
            .build());
    }
}
variables:
  testAssociations:
    fn::invoke:
      function: oci:CertificatesManagement:getAssociations
      arguments:
        associatedResourceId: ${testAssociatedResource.id}
        associationId: ${testAssociation.id}
        associationType: ${associationAssociationType}
        certificatesResourceId: ${testCertificatesResource.id}
        compartmentId: ${compartmentId}
        name: ${associationName}
Using getAssociations
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAssociations(args: GetAssociationsArgs, opts?: InvokeOptions): Promise<GetAssociationsResult>
function getAssociationsOutput(args: GetAssociationsOutputArgs, opts?: InvokeOptions): Output<GetAssociationsResult>def get_associations(associated_resource_id: Optional[str] = None,
                     association_id: Optional[str] = None,
                     association_type: Optional[str] = None,
                     certificates_resource_id: Optional[str] = None,
                     compartment_id: Optional[str] = None,
                     filters: Optional[Sequence[_certificatesmanagement.GetAssociationsFilter]] = None,
                     name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetAssociationsResult
def get_associations_output(associated_resource_id: Optional[pulumi.Input[str]] = None,
                     association_id: Optional[pulumi.Input[str]] = None,
                     association_type: Optional[pulumi.Input[str]] = None,
                     certificates_resource_id: Optional[pulumi.Input[str]] = None,
                     compartment_id: Optional[pulumi.Input[str]] = None,
                     filters: Optional[pulumi.Input[Sequence[pulumi.Input[_certificatesmanagement.GetAssociationsFilterArgs]]]] = None,
                     name: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetAssociationsResult]func GetAssociations(ctx *Context, args *GetAssociationsArgs, opts ...InvokeOption) (*GetAssociationsResult, error)
func GetAssociationsOutput(ctx *Context, args *GetAssociationsOutputArgs, opts ...InvokeOption) GetAssociationsResultOutput> Note: This function is named GetAssociations in the Go SDK.
public static class GetAssociations 
{
    public static Task<GetAssociationsResult> InvokeAsync(GetAssociationsArgs args, InvokeOptions? opts = null)
    public static Output<GetAssociationsResult> Invoke(GetAssociationsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAssociationsResult> getAssociations(GetAssociationsArgs args, InvokeOptions options)
public static Output<GetAssociationsResult> getAssociations(GetAssociationsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:CertificatesManagement/getAssociations:getAssociations
  arguments:
    # arguments dictionaryThe following arguments are supported:
- AssociatedResource stringId 
- A filter that returns only resources that match the given OCID of an associated Oracle Cloud Infrastructure resource.
- AssociationId string
- The OCID of the association. If the parameter is set to null, the service lists all associations.
- AssociationType string
- Type of associations to list. If the parameter is set to null, the service lists all types of associations.
- CertificatesResource stringId 
- A filter that returns only resources that match the given OCID of a certificate-related resource.
- CompartmentId string
- A filter that returns only resources that match the given compartment OCID.
- Filters
List<GetAssociations Filter> 
- Name string
- A filter that returns only resources that match the specified name.
- AssociatedResource stringId 
- A filter that returns only resources that match the given OCID of an associated Oracle Cloud Infrastructure resource.
- AssociationId string
- The OCID of the association. If the parameter is set to null, the service lists all associations.
- AssociationType string
- Type of associations to list. If the parameter is set to null, the service lists all types of associations.
- CertificatesResource stringId 
- A filter that returns only resources that match the given OCID of a certificate-related resource.
- CompartmentId string
- A filter that returns only resources that match the given compartment OCID.
- Filters
[]GetAssociations Filter 
- Name string
- A filter that returns only resources that match the specified name.
- associatedResource StringId 
- A filter that returns only resources that match the given OCID of an associated Oracle Cloud Infrastructure resource.
- associationId String
- The OCID of the association. If the parameter is set to null, the service lists all associations.
- associationType String
- Type of associations to list. If the parameter is set to null, the service lists all types of associations.
- certificatesResource StringId 
- A filter that returns only resources that match the given OCID of a certificate-related resource.
- compartmentId String
- A filter that returns only resources that match the given compartment OCID.
- filters
List<GetAssociations Filter> 
- name String
- A filter that returns only resources that match the specified name.
- associatedResource stringId 
- A filter that returns only resources that match the given OCID of an associated Oracle Cloud Infrastructure resource.
- associationId string
- The OCID of the association. If the parameter is set to null, the service lists all associations.
- associationType string
- Type of associations to list. If the parameter is set to null, the service lists all types of associations.
- certificatesResource stringId 
- A filter that returns only resources that match the given OCID of a certificate-related resource.
- compartmentId string
- A filter that returns only resources that match the given compartment OCID.
- filters
GetAssociations Filter[] 
- name string
- A filter that returns only resources that match the specified name.
- associated_resource_ strid 
- A filter that returns only resources that match the given OCID of an associated Oracle Cloud Infrastructure resource.
- association_id str
- The OCID of the association. If the parameter is set to null, the service lists all associations.
- association_type str
- Type of associations to list. If the parameter is set to null, the service lists all types of associations.
- certificates_resource_ strid 
- A filter that returns only resources that match the given OCID of a certificate-related resource.
- compartment_id str
- A filter that returns only resources that match the given compartment OCID.
- filters
Sequence[certificatesmanagement.Get Associations Filter] 
- name str
- A filter that returns only resources that match the specified name.
- associatedResource StringId 
- A filter that returns only resources that match the given OCID of an associated Oracle Cloud Infrastructure resource.
- associationId String
- The OCID of the association. If the parameter is set to null, the service lists all associations.
- associationType String
- Type of associations to list. If the parameter is set to null, the service lists all types of associations.
- certificatesResource StringId 
- A filter that returns only resources that match the given OCID of a certificate-related resource.
- compartmentId String
- A filter that returns only resources that match the given compartment OCID.
- filters List<Property Map>
- name String
- A filter that returns only resources that match the specified name.
getAssociations Result
The following output properties are available:
- AssociationCollections List<GetAssociations Association Collection> 
- The list of association_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- AssociatedResource stringId 
- The OCID of the associated resource.
- AssociationId string
- AssociationType string
- Type of the association.
- CertificatesResource stringId 
- The OCID of the certificate-related resource associated with another Oracle Cloud Infrastructure resource.
- CompartmentId string
- The compartment OCID of the association, which is strongly tied to the compartment OCID of the certificate-related resource.
- Filters
List<GetAssociations Filter> 
- Name string
- A user-friendly name generated by the service for the association, expressed in a format that follows the pattern: [certificatesResourceEntityType]-[associatedResourceEntityType]-UUID.
- AssociationCollections []GetAssociations Association Collection 
- The list of association_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- AssociatedResource stringId 
- The OCID of the associated resource.
- AssociationId string
- AssociationType string
- Type of the association.
- CertificatesResource stringId 
- The OCID of the certificate-related resource associated with another Oracle Cloud Infrastructure resource.
- CompartmentId string
- The compartment OCID of the association, which is strongly tied to the compartment OCID of the certificate-related resource.
- Filters
[]GetAssociations Filter 
- Name string
- A user-friendly name generated by the service for the association, expressed in a format that follows the pattern: [certificatesResourceEntityType]-[associatedResourceEntityType]-UUID.
- associationCollections List<GetAssociations Association Collection> 
- The list of association_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- associatedResource StringId 
- The OCID of the associated resource.
- associationId String
- associationType String
- Type of the association.
- certificatesResource StringId 
- The OCID of the certificate-related resource associated with another Oracle Cloud Infrastructure resource.
- compartmentId String
- The compartment OCID of the association, which is strongly tied to the compartment OCID of the certificate-related resource.
- filters
List<GetAssociations Filter> 
- name String
- A user-friendly name generated by the service for the association, expressed in a format that follows the pattern: [certificatesResourceEntityType]-[associatedResourceEntityType]-UUID.
- associationCollections GetAssociations Association Collection[] 
- The list of association_collection.
- id string
- The provider-assigned unique ID for this managed resource.
- associatedResource stringId 
- The OCID of the associated resource.
- associationId string
- associationType string
- Type of the association.
- certificatesResource stringId 
- The OCID of the certificate-related resource associated with another Oracle Cloud Infrastructure resource.
- compartmentId string
- The compartment OCID of the association, which is strongly tied to the compartment OCID of the certificate-related resource.
- filters
GetAssociations Filter[] 
- name string
- A user-friendly name generated by the service for the association, expressed in a format that follows the pattern: [certificatesResourceEntityType]-[associatedResourceEntityType]-UUID.
- association_collections Sequence[certificatesmanagement.Get Associations Association Collection] 
- The list of association_collection.
- id str
- The provider-assigned unique ID for this managed resource.
- associated_resource_ strid 
- The OCID of the associated resource.
- association_id str
- association_type str
- Type of the association.
- certificates_resource_ strid 
- The OCID of the certificate-related resource associated with another Oracle Cloud Infrastructure resource.
- compartment_id str
- The compartment OCID of the association, which is strongly tied to the compartment OCID of the certificate-related resource.
- filters
Sequence[certificatesmanagement.Get Associations Filter] 
- name str
- A user-friendly name generated by the service for the association, expressed in a format that follows the pattern: [certificatesResourceEntityType]-[associatedResourceEntityType]-UUID.
- associationCollections List<Property Map>
- The list of association_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- associatedResource StringId 
- The OCID of the associated resource.
- associationId String
- associationType String
- Type of the association.
- certificatesResource StringId 
- The OCID of the certificate-related resource associated with another Oracle Cloud Infrastructure resource.
- compartmentId String
- The compartment OCID of the association, which is strongly tied to the compartment OCID of the certificate-related resource.
- filters List<Property Map>
- name String
- A user-friendly name generated by the service for the association, expressed in a format that follows the pattern: [certificatesResourceEntityType]-[associatedResourceEntityType]-UUID.
Supporting Types
GetAssociationsAssociationCollection   
GetAssociationsAssociationCollectionItem    
- AssociatedResource stringId 
- A filter that returns only resources that match the given OCID of an associated Oracle Cloud Infrastructure resource.
- AssociationType string
- Type of associations to list. If the parameter is set to null, the service lists all types of associations.
- CertificatesResource stringId 
- A filter that returns only resources that match the given OCID of a certificate-related resource.
- CompartmentId string
- A filter that returns only resources that match the given compartment OCID.
- Id string
- The OCID of the association.
- Name string
- A filter that returns only resources that match the specified name.
- State string
- The current lifecycle state of the association.
- TimeCreated string
- A property indicating when the association was created, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
- AssociatedResource stringId 
- A filter that returns only resources that match the given OCID of an associated Oracle Cloud Infrastructure resource.
- AssociationType string
- Type of associations to list. If the parameter is set to null, the service lists all types of associations.
- CertificatesResource stringId 
- A filter that returns only resources that match the given OCID of a certificate-related resource.
- CompartmentId string
- A filter that returns only resources that match the given compartment OCID.
- Id string
- The OCID of the association.
- Name string
- A filter that returns only resources that match the specified name.
- State string
- The current lifecycle state of the association.
- TimeCreated string
- A property indicating when the association was created, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
- associatedResource StringId 
- A filter that returns only resources that match the given OCID of an associated Oracle Cloud Infrastructure resource.
- associationType String
- Type of associations to list. If the parameter is set to null, the service lists all types of associations.
- certificatesResource StringId 
- A filter that returns only resources that match the given OCID of a certificate-related resource.
- compartmentId String
- A filter that returns only resources that match the given compartment OCID.
- id String
- The OCID of the association.
- name String
- A filter that returns only resources that match the specified name.
- state String
- The current lifecycle state of the association.
- timeCreated String
- A property indicating when the association was created, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
- associatedResource stringId 
- A filter that returns only resources that match the given OCID of an associated Oracle Cloud Infrastructure resource.
- associationType string
- Type of associations to list. If the parameter is set to null, the service lists all types of associations.
- certificatesResource stringId 
- A filter that returns only resources that match the given OCID of a certificate-related resource.
- compartmentId string
- A filter that returns only resources that match the given compartment OCID.
- id string
- The OCID of the association.
- name string
- A filter that returns only resources that match the specified name.
- state string
- The current lifecycle state of the association.
- timeCreated string
- A property indicating when the association was created, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
- associated_resource_ strid 
- A filter that returns only resources that match the given OCID of an associated Oracle Cloud Infrastructure resource.
- association_type str
- Type of associations to list. If the parameter is set to null, the service lists all types of associations.
- certificates_resource_ strid 
- A filter that returns only resources that match the given OCID of a certificate-related resource.
- compartment_id str
- A filter that returns only resources that match the given compartment OCID.
- id str
- The OCID of the association.
- name str
- A filter that returns only resources that match the specified name.
- state str
- The current lifecycle state of the association.
- time_created str
- A property indicating when the association was created, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
- associatedResource StringId 
- A filter that returns only resources that match the given OCID of an associated Oracle Cloud Infrastructure resource.
- associationType String
- Type of associations to list. If the parameter is set to null, the service lists all types of associations.
- certificatesResource StringId 
- A filter that returns only resources that match the given OCID of a certificate-related resource.
- compartmentId String
- A filter that returns only resources that match the given compartment OCID.
- id String
- The OCID of the association.
- name String
- A filter that returns only resources that match the specified name.
- state String
- The current lifecycle state of the association.
- timeCreated String
- A property indicating when the association was created, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
GetAssociationsFilter  
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.