oracle.oci.oci_network_virtual_circuit_facts (5.0.0) — module

Fetches details about one or multiple VirtualCircuit resources in Oracle Cloud Infrastructure

| "added in version" 2.9.0 of oracle.oci"

Authors: Oracle (@oracle)

preview | supported by community

Install collection

Install with ansible-galaxy collection install oracle.oci:==5.0.0


Add to requirements.yml

  collections:
    - name: oracle.oci
      version: 5.0.0

Description

Fetches details about one or multiple VirtualCircuit resources in Oracle Cloud Infrastructure

Lists the virtual circuits in the specified compartment.

If I(virtual_circuit_id) is specified, the details of a single VirtualCircuit will be returned.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get a specific virtual_circuit
  oci_network_virtual_circuit_facts:
    # required
    virtual_circuit_id: "ocid1.virtualcircuit.oc1..xxxxxxEXAMPLExxxxxx"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: List virtual_circuits
  oci_network_virtual_circuit_facts:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"

    # optional
    display_name: display_name_example
    sort_by: TIMECREATED
    sort_order: ASC
    lifecycle_state: PENDING_PROVIDER

Inputs

    
region:
    description:
    - The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set,
      then the value of the OCI_REGION variable, if any, is used. This option is required
      if the region is not specified through a configuration file (See C(config_file_location)).
      Please refer to U(https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm)
      for more information on OCI regions.
    type: str

sort_by:
    choices:
    - TIMECREATED
    - DISPLAYNAME
    description:
    - The field to sort by. You can provide one sort order (`sortOrder`). Default order
      for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
      sort order is case sensitive.
    - '**Note:** In general, some "List" operations (for example, `ListInstances`) let
      you optionally filter by availability domain if the scope of the resource type is
      within a single availability domain. If you call one of these "List" operations
      without specifying an availability domain, the resources are grouped by availability
      domain, then sorted.'
    type: str

tenancy:
    description:
    - OCID of your tenancy. If not set, then the value of the OCI_TENANCY variable, if
      any, is used. This option is required if the tenancy OCID is not specified through
      a configuration file (See C(config_file_location)). To get the tenancy OCID, please
      refer U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm)
    type: str

api_user:
    description:
    - The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the
      value of the OCI_USER_ID environment variable, if any, is used. This option is required
      if the user is not specified through a configuration file (See C(config_file_location)).
      To get the user's OCID, please refer U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm).
    type: str

auth_type:
    choices:
    - api_key
    - instance_principal
    - instance_obo_user
    - resource_principal
    - security_token
    default: api_key
    description:
    - The type of authentication to use for making API requests. By default C(auth_type="api_key")
      based authentication is performed and the API key (see I(api_user_key_file)) in
      your config file will be used. If this 'auth_type' module option is not specified,
      the value of the OCI_ANSIBLE_AUTH_TYPE, if any, is used. Use C(auth_type="instance_principal")
      to use instance principal based authentication when running ansible playbooks within
      an OCI compute instance.
    type: str

sort_order:
    choices:
    - ASC
    - DESC
    description:
    - The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME
      sort order is case sensitive.
    type: str

cert_bundle:
    description:
    - The full path to a CA certificate bundle to be used for SSL verification. This will
      override the default CA certificate bundle. If not set, then the value of the OCI_ANSIBLE_CERT_BUNDLE
      variable, if any, is used.
    type: str

auth_purpose:
    choices:
    - service_principal
    description:
    - The auth purpose which can be used in conjunction with 'auth_type=instance_principal'.
      The default auth_purpose for instance_principal is None.
    type: str

display_name:
    aliases:
    - name
    description:
    - A filter to return only resources that match the given display name exactly.
    type: str

compartment_id:
    description:
    - The L(OCID,https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
      of the compartment.
    - Required to list multiple virtual_circuits.
    type: str

lifecycle_state:
    choices:
    - PENDING_PROVIDER
    - VERIFYING
    - PROVISIONING
    - PROVISIONED
    - FAILED
    - INACTIVE
    - TERMINATING
    - TERMINATED
    description:
    - A filter to return only resources that match the specified lifecycle state. The
      value is case insensitive.
    type: str

api_user_key_file:
    description:
    - Full path and filename of the private key (in PEM format). If not set, then the
      value of the OCI_USER_KEY_FILE variable, if any, is used. This option is required
      if the private key is not specified through a configuration file (See C(config_file_location)).
      If the key is encrypted with a pass-phrase, the C(api_user_key_pass_phrase) option
      must also be provided.
    type: str

virtual_circuit_id:
    aliases:
    - id
    description:
    - The L(OCID,https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
      of the virtual circuit.
    - Required to get a specific virtual_circuit.
    type: str

config_profile_name:
    description:
    - The profile to load from the config file referenced by C(config_file_location).
      If not set, then the value of the OCI_CONFIG_PROFILE environment variable, if any,
      is used. Otherwise, defaults to the "DEFAULT" profile in C(config_file_location).
    type: str

api_user_fingerprint:
    description:
    - Fingerprint for the key pair being used. If not set, then the value of the OCI_USER_FINGERPRINT
      environment variable, if any, is used. This option is required if the key fingerprint
      is not specified through a configuration file (See C(config_file_location)). To
      get the key pair's fingerprint value please refer U(https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm).
    type: str

config_file_location:
    description:
    - Path to configuration file. If not set then the value of the OCI_CONFIG_FILE environment
      variable, if any, is used. Otherwise, defaults to ~/.oci/config.
    type: str

api_user_key_pass_phrase:
    description:
    - Passphrase used by the key referenced in C(api_user_key_file), if it is encrypted.
      If not set, then the value of the OCI_USER_KEY_PASS_PHRASE variable, if any, is
      used. This option is required if the key passphrase is not specified through a configuration
      file (See C(config_file_location)).
    type: str

realm_specific_endpoint_template_enabled:
    description:
    - Enable/Disable realm specific endpoint template for service client. By Default,
      realm specific endpoint template is disabled. If not set, then the value of the
      OCI_REALM_SPECIFIC_SERVICE_ENDPOINT_TEMPLATE_ENABLED variable, if any, is used.
    type: bool

Outputs

virtual_circuits:
  contains:
    bandwidth_shape_name:
      description:
      - The provisioned data rate of the connection. To get a list of the available
        bandwidth levels (that is, shapes), see L(ListFastConnectProviderServiceVirtualCircuitBandwidthShapes,https://docs.cloud.oracle.com/en-
        us/iaas/api/#/en/iaas/latest/FastConnectProviderService/ListFastConnectProviderVirtualCircuitBandwidthShapes).
      - 'Example: `10 Gbps`'
      returned: on success
      sample: bandwidth_shape_name_example
      type: str
    bgp_admin_state:
      description:
      - Set to `ENABLED` (the default) to activate the BGP session of the virtual
        circuit, set to `DISABLED` to deactivate the virtual circuit.
      returned: on success
      sample: ENABLED
      type: str
    bgp_ipv6_session_state:
      description:
      - The state of the Ipv6 BGP session associated with the virtual circuit.
      returned: on success
      sample: UP
      type: str
    bgp_management:
      description:
      - Deprecated. Instead use the information in L(FastConnectProviderService,https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/FastConnectProviderService/).
      returned: on success
      sample: CUSTOMER_MANAGED
      type: str
    bgp_session_state:
      description:
      - The state of the Ipv4 BGP session associated with the virtual circuit.
      returned: on success
      sample: UP
      type: str
    compartment_id:
      description:
      - The L(OCID,https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
        of the compartment containing the virtual circuit.
      returned: on success
      sample: ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
      type: str
    cross_connect_mappings:
      contains:
        bgp_md5_auth_key:
          description:
          - The key for BGP MD5 authentication. Only applicable if your system requires
            MD5 authentication. If empty or not set (null), that means you don't use
            BGP MD5 authentication.
          returned: on success
          sample: bgp_md5_auth_key_example
          type: str
        cross_connect_or_cross_connect_group_id:
          description:
          - The L(OCID,https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
            of the cross-connect or cross-connect group for this mapping. Specified
            by the owner of the cross-connect or cross-connect group (the customer
            if the customer is colocated with Oracle, or the provider if the customer
            is connecting via provider).
          returned: on success
          sample: ocid1.crossconnectorcrossconnectgroup.oc1..xxxxxxEXAMPLExxxxxx
          type: str
        customer_bgp_peering_ip:
          description:
          - The BGP IPv4 address for the router on the other end of the BGP session
            from Oracle. Specified by the owner of that router. If the session goes
            from Oracle to a customer, this is the BGP IPv4 address of the customer's
            edge router. If the session goes from Oracle to a provider, this is the
            BGP IPv4 address of the provider's edge router. Must use a subnet mask
            from /28 to /31.
          - 'There''s one exception: for a public virtual circuit, Oracle specifies
            the BGP IPv4 addresses.'
          - 'Example: `10.0.0.18/31`'
          returned: on success
          sample: customer_bgp_peering_ip_example
          type: str
        customer_bgp_peering_ipv6:
          description:
          - The BGP IPv6 address for the router on the other end of the BGP session
            from Oracle. Specified by the owner of that router. If the session goes
            from Oracle to a customer, this is the BGP IPv6 address of the customer's
            edge router. If the session goes from Oracle to a provider, this is the
            BGP IPv6 address of the provider's edge router. Only subnet masks from
            /64 up to /127 are allowed.
          - 'There''s one exception: for a public virtual circuit, Oracle specifies
            the BGP IPv6 addresses.'
          - IPv6 addressing is supported for all commercial and government regions.
            See L(IPv6 Addresses,https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm).
          - 'Example: `2001:db8::1/64`'
          returned: on success
          sample: customer_bgp_peering_ipv6_example
          type: str
        oracle_bgp_peering_ip:
          description:
          - The IPv4 address for Oracle's end of the BGP session. Must use a subnet
            mask from /28 to /31. If the session goes from Oracle to a customer's
            edge router, the customer specifies this information. If the session goes
            from Oracle to a provider's edge router, the provider specifies this.
          - 'There''s one exception: for a public virtual circuit, Oracle specifies
            the BGP IPv4 addresses.'
          - 'Example: `10.0.0.19/31`'
          returned: on success
          sample: oracle_bgp_peering_ip_example
          type: str
        oracle_bgp_peering_ipv6:
          description:
          - The IPv6 address for Oracle's end of the BGP session. Only subnet masks
            from /64 up to /127 are allowed. If the session goes from Oracle to a
            customer's edge router, the customer specifies this information. If the
            session goes from Oracle to a provider's edge router, the provider specifies
            this.
          - 'There''s one exception: for a public virtual circuit, Oracle specifies
            the BGP IPv6 addresses.'
          - Note that IPv6 addressing is currently supported only in certain regions.
            See L(IPv6 Addresses,https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm).
          - 'Example: `2001:db8::2/64`'
          returned: on success
          sample: oracle_bgp_peering_ipv6_example
          type: str
        vlan:
          description:
          - The number of the specific VLAN (on the cross-connect or cross-connect
            group) that is assigned to this virtual circuit. Specified by the owner
            of the cross-connect or cross-connect group (the customer if the customer
            is colocated with Oracle, or the provider if the customer is connecting
            via provider).
          - 'Example: `200`'
          returned: on success
          sample: 56
          type: int
      description:
      - An array of mappings, each containing properties for a cross-connect or cross-connect
        group that is associated with this virtual circuit.
      returned: on success
      type: complex
    customer_asn:
      description:
      - The BGP ASN of the network at the other end of the BGP session from Oracle.
        If the session is between the customer's edge router and Oracle, the value
        is the customer's ASN. If the BGP session is between the provider's edge router
        and Oracle, the value is the provider's ASN. Can be a 2-byte or 4-byte ASN.
        Uses "asplain" format.
      returned: on success
      sample: 56
      type: int
    customer_bgp_asn:
      description:
      - Deprecated. Instead use `customerAsn`. If you specify values for both, the
        request will be rejected.
      returned: on success
      sample: 56
      type: int
    defined_tags:
      description:
      - Defined tags for this resource. Each key is predefined and scoped to a namespace.
        For more information, see L(Resource Tags,https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm).
      - 'Example: `{"Operations": {"CostCenter": "42"}}`'
      returned: on success
      sample:
        Operations:
          CostCenter: US
      type: dict
    display_name:
      description:
      - A user-friendly name. Does not have to be unique, and it's changeable. Avoid
        entering confidential information.
      returned: on success
      sample: display_name_example
      type: str
    freeform_tags:
      description:
      - Free-form tags for this resource. Each tag is a simple key-value pair with
        no predefined name, type, or namespace. For more information, see L(Resource
        Tags,https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm).
      - 'Example: `{"Department": "Finance"}`'
      returned: on success
      sample:
        Department: Finance
      type: dict
    gateway_id:
      description:
      - The L(OCID,https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
        of the customer's L(dynamic routing gateway (DRG),https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/Drg)
        that this virtual circuit uses. Applicable only to private virtual circuits.
      returned: on success
      sample: ocid1.gateway.oc1..xxxxxxEXAMPLExxxxxx
      type: str
    id:
      description:
      - The virtual circuit's Oracle ID (L(OCID,https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)).
      returned: on success
      sample: ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
      type: str
    ip_mtu:
      description:
      - The layer 3 IP MTU to use on this virtual circuit.
      returned: on success
      sample: MTU_1500
      type: str
    is_bfd_enabled:
      description:
      - Set to `true` to enable BFD for IPv4 BGP peering, or set to `false` to disable
        BFD. If this is not set, the default is `false`.
      returned: on success
      sample: true
      type: bool
    lifecycle_state:
      description:
      - The virtual circuit's current state. For information about the different states,
        see L(FastConnect Overview,https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm).
      returned: on success
      sample: PENDING_PROVIDER
      type: str
    oracle_bgp_asn:
      description:
      - The Oracle BGP ASN.
      returned: on success
      sample: 56
      type: int
    provider_name:
      description:
      - Deprecated. Instead use `providerServiceId`.
      returned: on success
      sample: provider_name_example
      type: str
    provider_service_id:
      description:
      - The L(OCID,https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)
        of the service offered by the provider (if the customer is connecting via
        a provider).
      returned: on success
      sample: ocid1.providerservice.oc1..xxxxxxEXAMPLExxxxxx
      type: str
    provider_service_key_name:
      description:
      - The service key name offered by the provider (if the customer is connecting
        via a provider).
      returned: on success
      sample: provider_service_key_name_example
      type: str
    provider_service_name:
      description:
      - Deprecated. Instead use `providerServiceId`.
      returned: on success
      sample: provider_service_name_example
      type: str
    provider_state:
      description:
      - The provider's state in relation to this virtual circuit (if the customer
        is connecting via a provider). ACTIVE means the provider has provisioned the
        virtual circuit from their end. INACTIVE means the provider has not yet provisioned
        the virtual circuit, or has de-provisioned it.
      returned: on success
      sample: ACTIVE
      type: str
    public_prefixes:
      description:
      - For a public virtual circuit. The public IP prefixes (CIDRs) the customer
        wants to advertise across the connection. All prefix sizes are allowed.
      returned: on success
      sample: []
      type: list
    reference_comment:
      description:
      - Provider-supplied reference information about this virtual circuit (if the
        customer is connecting via a provider).
      returned: on success
      sample: reference_comment_example
      type: str
    region:
      description:
      - The Oracle Cloud Infrastructure region where this virtual circuit is located.
      returned: on success
      sample: us-phoenix-1
      type: str
    routing_policy:
      description:
      - 'The routing policy sets how routing information about the Oracle cloud is
        shared over a public virtual circuit. Policies available are: `ORACLE_SERVICE_NETWORK`,
        `REGIONAL`, `MARKET_LEVEL`, and `GLOBAL`. See L(Route Filtering,https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/routingonprem.htm#route_filtering)
        for details. By default, routing information is shared for all routes in the
        same market.'
      returned: on success
      sample: []
      type: list
    service_type:
      description:
      - Provider service type.
      returned: on success
      sample: COLOCATED
      type: str
    time_created:
      description:
      - The date and time the virtual circuit was created, in the format defined by
        L(RFC3339,https://tools.ietf.org/html/rfc3339).
      - 'Example: `2016-08-25T21:10:29.600Z`'
      returned: on success
      sample: '2013-10-20T19:20:30+01:00'
      type: str
    type:
      description:
      - Whether the virtual circuit supports private or public peering. For more information,
        see L(FastConnect Overview,https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm).
      returned: on success
      sample: PUBLIC
      type: str
  description:
  - List of VirtualCircuit resources
  returned: on success
  sample:
  - bandwidth_shape_name: bandwidth_shape_name_example
    bgp_admin_state: ENABLED
    bgp_ipv6_session_state: UP
    bgp_management: CUSTOMER_MANAGED
    bgp_session_state: UP
    compartment_id: ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
    cross_connect_mappings:
    - bgp_md5_auth_key: bgp_md5_auth_key_example
      cross_connect_or_cross_connect_group_id: ocid1.crossconnectorcrossconnectgroup.oc1..xxxxxxEXAMPLExxxxxx
      customer_bgp_peering_ip: customer_bgp_peering_ip_example
      customer_bgp_peering_ipv6: customer_bgp_peering_ipv6_example
      oracle_bgp_peering_ip: oracle_bgp_peering_ip_example
      oracle_bgp_peering_ipv6: oracle_bgp_peering_ipv6_example
      vlan: 56
    customer_asn: 56
    customer_bgp_asn: 56
    defined_tags:
      Operations:
        CostCenter: US
    display_name: display_name_example
    freeform_tags:
      Department: Finance
    gateway_id: ocid1.gateway.oc1..xxxxxxEXAMPLExxxxxx
    id: ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
    ip_mtu: MTU_1500
    is_bfd_enabled: true
    lifecycle_state: PENDING_PROVIDER
    oracle_bgp_asn: 56
    provider_name: provider_name_example
    provider_service_id: ocid1.providerservice.oc1..xxxxxxEXAMPLExxxxxx
    provider_service_key_name: provider_service_key_name_example
    provider_service_name: provider_service_name_example
    provider_state: ACTIVE
    public_prefixes: []
    reference_comment: reference_comment_example
    region: us-phoenix-1
    routing_policy: []
    service_type: COLOCATED
    time_created: '2013-10-20T19:20:30+01:00'
    type: PUBLIC
  type: complex