oracle.oci.oci_network_virtual_circuit_facts – Fetches details about one or multiple VirtualCircuit resources in Oracle Cloud Infrastructure

Note

This plugin is part of the oracle.oci collection (version 4.13.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install oracle.oci.

To use it in a playbook, specify: oracle.oci.oci_network_virtual_circuit_facts.

New in version 2.9.0: of oracle.oci

Synopsis

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

  • Lists the virtual circuits in the specified compartment.

  • If virtual_circuit_id is specified, the details of a single VirtualCircuit will be returned.

Requirements

The below requirements are needed on the host that executes this module.

Parameters

Parameter Choices/Defaults Comments
api_user
string
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 config_file_location). To get the user's OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_fingerprint
string
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 config_file_location). To get the key pair's fingerprint value please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_key_file
string
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 config_file_location). If the key is encrypted with a pass-phrase, the api_user_key_pass_phrase option must also be provided.
api_user_key_pass_phrase
string
Passphrase used by the key referenced in 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 config_file_location).
auth_purpose
string
    Choices:
  • service_principal
The auth purpose which can be used in conjunction with 'auth_type=instance_principal'. The default auth_purpose for instance_principal is None.
auth_type
string
    Choices:
  • api_key ←
  • instance_principal
  • instance_obo_user
  • resource_principal
The type of authentication to use for making API requests. By default auth_type="api_key" based authentication is performed and the API key (see 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 auth_type="instance_principal" to use instance principal based authentication when running ansible playbooks within an OCI compute instance.
cert_bundle
string
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.
compartment_id
string
The OCID of the compartment.
Required to list multiple virtual_circuits.
config_file_location
string
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.
config_profile_name
string
The profile to load from the config file referenced by 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 config_file_location.
display_name
string
A filter to return only resources that match the given display name exactly.

aliases: name
lifecycle_state
string
    Choices:
  • PENDING_PROVIDER
  • VERIFYING
  • PROVISIONING
  • PROVISIONED
  • FAILED
  • INACTIVE
  • TERMINATING
  • TERMINATED
A filter to return only resources that match the specified lifecycle state. The value is case insensitive.
region
string
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 config_file_location). Please refer to https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm for more information on OCI regions.
sort_by
string
    Choices:
  • TIMECREATED
  • DISPLAYNAME
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.
sort_order
string
    Choices:
  • ASC
  • DESC
The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive.
tenancy
string
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 config_file_location). To get the tenancy OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm
virtual_circuit_id
string
The OCID of the virtual circuit.
Required to get a specific virtual_circuit.

aliases: id

Examples

- name: Get a specific virtual_circuit
  oci_network_virtual_circuit_facts:
    # required
    virtual_circuit_id: "ocid1.virtualcircuit.oc1..xxxxxxEXAMPLExxxxxx"

- 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

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
virtual_circuits
complex
on success
List of VirtualCircuit resources

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'}]
 
bandwidth_shape_name
string
on success
The provisioned data rate of the connection. To get a list of the available bandwidth levels (that is, shapes), see ListFastConnectProviderServiceVirtualCircuitBandwidthShapes.
Example: `10 Gbps`

Sample:
bandwidth_shape_name_example
 
bgp_admin_state
string
on success
Set to `ENABLED` (the default) to activate the BGP session of the virtual circuit, set to `DISABLED` to deactivate the virtual circuit.

Sample:
ENABLED
 
bgp_ipv6_session_state
string
on success
The state of the Ipv6 BGP session associated with the virtual circuit.

Sample:
UP
 
bgp_management
string
on success
Deprecated. Instead use the information in FastConnectProviderService.

Sample:
CUSTOMER_MANAGED
 
bgp_session_state
string
on success
The state of the Ipv4 BGP session associated with the virtual circuit.

Sample:
UP
 
compartment_id
string
on success
The OCID of the compartment containing the virtual circuit.

Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
 
cross_connect_mappings
complex
on success
An array of mappings, each containing properties for a cross-connect or cross-connect group that is associated with this virtual circuit.

   
bgp_md5_auth_key
string
on success
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.

Sample:
bgp_md5_auth_key_example
   
cross_connect_or_cross_connect_group_id
string
on success
The OCID 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).

Sample:
ocid1.crossconnectorcrossconnectgroup.oc1..xxxxxxEXAMPLExxxxxx
   
customer_bgp_peering_ip
string
on success
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`

Sample:
customer_bgp_peering_ip_example
   
customer_bgp_peering_ipv6
string
on success
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 IPv6 Addresses.
Example: `2001:db8::1/64`

Sample:
customer_bgp_peering_ipv6_example
   
oracle_bgp_peering_ip
string
on success
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`

Sample:
oracle_bgp_peering_ip_example
   
oracle_bgp_peering_ipv6
string
on success
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 IPv6 Addresses.
Example: `2001:db8::2/64`

Sample:
oracle_bgp_peering_ipv6_example
   
vlan
integer
on success
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`

Sample:
56
 
customer_asn
integer
on success
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.

Sample:
56
 
customer_bgp_asn
integer
on success
Deprecated. Instead use `customerAsn`. If you specify values for both, the request will be rejected.

Sample:
56
 
defined_tags
dictionary
on success
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: `{"Operations": {"CostCenter": "42"}}`

Sample:
{'Operations': {'CostCenter': 'US'}}
 
display_name
string
on success
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

Sample:
display_name_example
 
freeform_tags
dictionary
on success
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 Resource Tags.
Example: `{"Department": "Finance"}`

Sample:
{'Department': 'Finance'}
 
gateway_id
string
on success
The OCID 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.

Sample:
ocid1.gateway.oc1..xxxxxxEXAMPLExxxxxx
 
id
string
on success
The virtual circuit's Oracle ID (OCID).

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
ip_mtu
string
on success
The layer 3 IP MTU to use on this virtual circuit.

Sample:
MTU_1500
 
is_bfd_enabled
boolean
on success
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`.

Sample:
True
 
lifecycle_state
string
on success
The virtual circuit's current state. For information about the different states, see FastConnect Overview.

Sample:
PENDING_PROVIDER
 
oracle_bgp_asn
integer
on success
The Oracle BGP ASN.

Sample:
56
 
provider_name
string
on success
Deprecated. Instead use `providerServiceId`.

Sample:
provider_name_example
 
provider_service_id
string
on success
The OCID of the service offered by the provider (if the customer is connecting via a provider).

Sample:
ocid1.providerservice.oc1..xxxxxxEXAMPLExxxxxx
 
provider_service_key_name
string
on success
The service key name offered by the provider (if the customer is connecting via a provider).

Sample:
provider_service_key_name_example
 
provider_service_name
string
on success
Deprecated. Instead use `providerServiceId`.

Sample:
provider_service_name_example
 
provider_state
string
on success
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.

Sample:
ACTIVE
 
public_prefixes
list / elements=string
on success
For a public virtual circuit. The public IP prefixes (CIDRs) the customer wants to advertise across the connection. All prefix sizes are allowed.

 
reference_comment
string
on success
Provider-supplied reference information about this virtual circuit (if the customer is connecting via a provider).

Sample:
reference_comment_example
 
region
string
on success
The Oracle Cloud Infrastructure region where this virtual circuit is located.

Sample:
us-phoenix-1
 
routing_policy
list / elements=string
on success
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 Route Filtering for details. By default, routing information is shared for all routes in the same market.

 
service_type
string
on success
Provider service type.

Sample:
COLOCATED
 
time_created
string
on success
The date and time the virtual circuit was created, in the format defined by RFC3339.
Example: `2016-08-25T21:10:29.600Z`

Sample:
2013-10-20T19:20:30+01:00
 
type
string
on success
Whether the virtual circuit supports private or public peering. For more information, see FastConnect Overview.

Sample:
PUBLIC


Authors

  • Oracle (@oracle)