1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. CertificatesManagement
  5. getAssociations
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.CertificatesManagement.getAssociations

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

    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/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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:CertificatesManagement/getAssociations:getAssociations
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AssociatedResourceId string
    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.
    CertificatesResourceId string
    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<GetAssociationsFilter>
    Name string
    A filter that returns only resources that match the specified name.
    AssociatedResourceId string
    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.
    CertificatesResourceId string
    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 []GetAssociationsFilter
    Name string
    A filter that returns only resources that match the specified name.
    associatedResourceId String
    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.
    certificatesResourceId String
    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<GetAssociationsFilter>
    name String
    A filter that returns only resources that match the specified name.
    associatedResourceId string
    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.
    certificatesResourceId string
    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 GetAssociationsFilter[]
    name string
    A filter that returns only resources that match the specified name.
    associated_resource_id str
    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_id str
    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.GetAssociationsFilter]
    name str
    A filter that returns only resources that match the specified name.
    associatedResourceId String
    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.
    certificatesResourceId String
    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<GetAssociationsAssociationCollection>
    The list of association_collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    AssociatedResourceId string
    The OCID of the associated resource.
    AssociationId string
    AssociationType string
    Type of the association.
    CertificatesResourceId string
    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<GetAssociationsFilter>
    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 []GetAssociationsAssociationCollection
    The list of association_collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    AssociatedResourceId string
    The OCID of the associated resource.
    AssociationId string
    AssociationType string
    Type of the association.
    CertificatesResourceId string
    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 []GetAssociationsFilter
    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<GetAssociationsAssociationCollection>
    The list of association_collection.
    id String
    The provider-assigned unique ID for this managed resource.
    associatedResourceId String
    The OCID of the associated resource.
    associationId String
    associationType String
    Type of the association.
    certificatesResourceId String
    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<GetAssociationsFilter>
    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 GetAssociationsAssociationCollection[]
    The list of association_collection.
    id string
    The provider-assigned unique ID for this managed resource.
    associatedResourceId string
    The OCID of the associated resource.
    associationId string
    associationType string
    Type of the association.
    certificatesResourceId string
    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 GetAssociationsFilter[]
    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.GetAssociationsAssociationCollection]
    The list of association_collection.
    id str
    The provider-assigned unique ID for this managed resource.
    associated_resource_id str
    The OCID of the associated resource.
    association_id str
    association_type str
    Type of the association.
    certificates_resource_id str
    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.GetAssociationsFilter]
    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.
    associatedResourceId String
    The OCID of the associated resource.
    associationId String
    associationType String
    Type of the association.
    certificatesResourceId String
    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

    AssociatedResourceId string
    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.
    CertificatesResourceId string
    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
    AssociatedResourceId string
    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.
    CertificatesResourceId string
    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
    associatedResourceId String
    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.
    certificatesResourceId String
    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
    associatedResourceId string
    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.
    certificatesResourceId string
    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_id str
    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_id str
    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
    associatedResourceId String
    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.
    certificatesResourceId String
    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

    Name string
    A filter that returns only resources that match the specified name.
    Values List<string>
    Regex bool
    Name string
    A filter that returns only resources that match the specified name.
    Values []string
    Regex bool
    name String
    A filter that returns only resources that match the specified name.
    values List<String>
    regex Boolean
    name string
    A filter that returns only resources that match the specified name.
    values string[]
    regex boolean
    name str
    A filter that returns only resources that match the specified name.
    values Sequence[str]
    regex bool
    name String
    A filter that returns only resources that match the specified name.
    values List<String>
    regex Boolean

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi