Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi
oci.OspGateway.getAddressRule
Explore with Pulumi AI
This data source provides details about a specific Address Rule resource in Oracle Cloud Infrastructure Osp Gateway service.
Get the address rule for the compartment based on the country code
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testAddressRule = oci.OspGateway.getAddressRule({
    compartmentId: compartmentId,
    countryCode: addressRuleCountryCode,
    ospHomeRegion: addressRuleOspHomeRegion,
});
import pulumi
import pulumi_oci as oci
test_address_rule = oci.OspGateway.get_address_rule(compartment_id=compartment_id,
    country_code=address_rule_country_code,
    osp_home_region=address_rule_osp_home_region)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/ospgateway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ospgateway.GetAddressRule(ctx, &ospgateway.GetAddressRuleArgs{
			CompartmentId: compartmentId,
			CountryCode:   addressRuleCountryCode,
			OspHomeRegion: addressRuleOspHomeRegion,
		}, 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 testAddressRule = Oci.OspGateway.GetAddressRule.Invoke(new()
    {
        CompartmentId = compartmentId,
        CountryCode = addressRuleCountryCode,
        OspHomeRegion = addressRuleOspHomeRegion,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.OspGateway.OspGatewayFunctions;
import com.pulumi.oci.OspGateway.inputs.GetAddressRuleArgs;
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 testAddressRule = OspGatewayFunctions.getAddressRule(GetAddressRuleArgs.builder()
            .compartmentId(compartmentId)
            .countryCode(addressRuleCountryCode)
            .ospHomeRegion(addressRuleOspHomeRegion)
            .build());
    }
}
variables:
  testAddressRule:
    fn::invoke:
      function: oci:OspGateway:getAddressRule
      arguments:
        compartmentId: ${compartmentId}
        countryCode: ${addressRuleCountryCode}
        ospHomeRegion: ${addressRuleOspHomeRegion}
Using getAddressRule
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 getAddressRule(args: GetAddressRuleArgs, opts?: InvokeOptions): Promise<GetAddressRuleResult>
function getAddressRuleOutput(args: GetAddressRuleOutputArgs, opts?: InvokeOptions): Output<GetAddressRuleResult>def get_address_rule(compartment_id: Optional[str] = None,
                     country_code: Optional[str] = None,
                     osp_home_region: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetAddressRuleResult
def get_address_rule_output(compartment_id: Optional[pulumi.Input[str]] = None,
                     country_code: Optional[pulumi.Input[str]] = None,
                     osp_home_region: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetAddressRuleResult]func GetAddressRule(ctx *Context, args *GetAddressRuleArgs, opts ...InvokeOption) (*GetAddressRuleResult, error)
func GetAddressRuleOutput(ctx *Context, args *GetAddressRuleOutputArgs, opts ...InvokeOption) GetAddressRuleResultOutput> Note: This function is named GetAddressRule in the Go SDK.
public static class GetAddressRule 
{
    public static Task<GetAddressRuleResult> InvokeAsync(GetAddressRuleArgs args, InvokeOptions? opts = null)
    public static Output<GetAddressRuleResult> Invoke(GetAddressRuleInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAddressRuleResult> getAddressRule(GetAddressRuleArgs args, InvokeOptions options)
public static Output<GetAddressRuleResult> getAddressRule(GetAddressRuleArgs args, InvokeOptions options)
fn::invoke:
  function: oci:OspGateway/getAddressRule:getAddressRule
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID of the compartment.
- CountryCode string
- Country code for the address rule in ISO-3166-1 2-letter format.
- OspHome stringRegion 
- The home region's public name of the logged in user.
- CompartmentId string
- The OCID of the compartment.
- CountryCode string
- Country code for the address rule in ISO-3166-1 2-letter format.
- OspHome stringRegion 
- The home region's public name of the logged in user.
- compartmentId String
- The OCID of the compartment.
- countryCode String
- Country code for the address rule in ISO-3166-1 2-letter format.
- ospHome StringRegion 
- The home region's public name of the logged in user.
- compartmentId string
- The OCID of the compartment.
- countryCode string
- Country code for the address rule in ISO-3166-1 2-letter format.
- ospHome stringRegion 
- The home region's public name of the logged in user.
- compartment_id str
- The OCID of the compartment.
- country_code str
- Country code for the address rule in ISO-3166-1 2-letter format.
- osp_home_ strregion 
- The home region's public name of the logged in user.
- compartmentId String
- The OCID of the compartment.
- countryCode String
- Country code for the address rule in ISO-3166-1 2-letter format.
- ospHome StringRegion 
- The home region's public name of the logged in user.
getAddressRule Result
The following output properties are available:
- Addresses
List<GetAddress Rule Address> 
- Address type rule information
- CompartmentId string
- Contacts
List<GetAddress Rule Contact> 
- Contact type rule information
- CountryCode string
- Country code for the address rule in ISO-3166-1 2-letter format
- Id string
- The provider-assigned unique ID for this managed resource.
- OspHome stringRegion 
- Taxes
List<GetAddress Rule Tax> 
- Tax type rule information
- Addresses
[]GetAddress Rule Address 
- Address type rule information
- CompartmentId string
- Contacts
[]GetAddress Rule Contact 
- Contact type rule information
- CountryCode string
- Country code for the address rule in ISO-3166-1 2-letter format
- Id string
- The provider-assigned unique ID for this managed resource.
- OspHome stringRegion 
- Taxes
[]GetAddress Rule Tax 
- Tax type rule information
- addresses
List<GetAddress Rule Address> 
- Address type rule information
- compartmentId String
- contacts
List<GetAddress Rule Contact> 
- Contact type rule information
- countryCode String
- Country code for the address rule in ISO-3166-1 2-letter format
- id String
- The provider-assigned unique ID for this managed resource.
- ospHome StringRegion 
- taxes
List<GetAddress Rule Tax> 
- Tax type rule information
- addresses
GetAddress Rule Address[] 
- Address type rule information
- compartmentId string
- contacts
GetAddress Rule Contact[] 
- Contact type rule information
- countryCode string
- Country code for the address rule in ISO-3166-1 2-letter format
- id string
- The provider-assigned unique ID for this managed resource.
- ospHome stringRegion 
- taxes
GetAddress Rule Tax[] 
- Tax type rule information
- addresses
Sequence[ospgateway.Get Address Rule Address] 
- Address type rule information
- compartment_id str
- contacts
Sequence[ospgateway.Get Address Rule Contact] 
- Contact type rule information
- country_code str
- Country code for the address rule in ISO-3166-1 2-letter format
- id str
- The provider-assigned unique ID for this managed resource.
- osp_home_ strregion 
- taxes
Sequence[ospgateway.Get Address Rule Tax] 
- Tax type rule information
- addresses List<Property Map>
- Address type rule information
- compartmentId String
- contacts List<Property Map>
- Contact type rule information
- countryCode String
- Country code for the address rule in ISO-3166-1 2-letter format
- id String
- The provider-assigned unique ID for this managed resource.
- ospHome StringRegion 
- taxes List<Property Map>
- Tax type rule information
Supporting Types
GetAddressRuleAddress   
- Fields
List<GetAddress Rule Address Field> 
- Tax type rule fields
- ThirdParty stringValidation 
- Third party validation.
- Fields
[]GetAddress Rule Address Field 
- Tax type rule fields
- ThirdParty stringValidation 
- Third party validation.
- fields
List<GetAddress Rule Address Field> 
- Tax type rule fields
- thirdParty StringValidation 
- Third party validation.
- fields
GetAddress Rule Address Field[] 
- Tax type rule fields
- thirdParty stringValidation 
- Third party validation.
- fields
Sequence[ospgateway.Get Address Rule Address Field] 
- Tax type rule fields
- third_party_ strvalidation 
- Third party validation.
- fields List<Property Map>
- Tax type rule fields
- thirdParty StringValidation 
- Third party validation.
GetAddressRuleAddressField    
- Formats
List<GetAddress Rule Address Field Format> 
- Format information
- IsRequired bool
- The given field is requeired or not
- Labels
List<GetAddress Rule Address Field Label> 
- Label information
- Language string
- Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)
- Name string
- User friendly name
- Formats
[]GetAddress Rule Address Field Format 
- Format information
- IsRequired bool
- The given field is requeired or not
- Labels
[]GetAddress Rule Address Field Label 
- Label information
- Language string
- Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)
- Name string
- User friendly name
- formats
List<GetAddress Rule Address Field Format> 
- Format information
- isRequired Boolean
- The given field is requeired or not
- labels
List<GetAddress Rule Address Field Label> 
- Label information
- language String
- Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)
- name String
- User friendly name
- formats
GetAddress Rule Address Field Format[] 
- Format information
- isRequired boolean
- The given field is requeired or not
- labels
GetAddress Rule Address Field Label[] 
- Label information
- language string
- Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)
- name string
- User friendly name
- formats
Sequence[ospgateway.Get Address Rule Address Field Format] 
- Format information
- is_required bool
- The given field is requeired or not
- labels
Sequence[ospgateway.Get Address Rule Address Field Label] 
- Label information
- language str
- Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)
- name str
- User friendly name
- formats List<Property Map>
- Format information
- isRequired Boolean
- The given field is requeired or not
- labels List<Property Map>
- Label information
- language String
- Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)
- name String
- User friendly name
GetAddressRuleAddressFieldFormat     
GetAddressRuleAddressFieldLabel     
GetAddressRuleContact   
- Fields
List<GetAddress Rule Contact Field> 
- Tax type rule fields
- Fields
[]GetAddress Rule Contact Field 
- Tax type rule fields
- fields
List<GetAddress Rule Contact Field> 
- Tax type rule fields
- fields
GetAddress Rule Contact Field[] 
- Tax type rule fields
- fields
Sequence[ospgateway.Get Address Rule Contact Field] 
- Tax type rule fields
- fields List<Property Map>
- Tax type rule fields
GetAddressRuleContactField    
- Formats
List<GetAddress Rule Contact Field Format> 
- Format information
- IsRequired bool
- The given field is requeired or not
- Labels
List<GetAddress Rule Contact Field Label> 
- Label information
- Language string
- Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)
- Name string
- User friendly name
- Formats
[]GetAddress Rule Contact Field Format 
- Format information
- IsRequired bool
- The given field is requeired or not
- Labels
[]GetAddress Rule Contact Field Label 
- Label information
- Language string
- Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)
- Name string
- User friendly name
- formats
List<GetAddress Rule Contact Field Format> 
- Format information
- isRequired Boolean
- The given field is requeired or not
- labels
List<GetAddress Rule Contact Field Label> 
- Label information
- language String
- Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)
- name String
- User friendly name
- formats
GetAddress Rule Contact Field Format[] 
- Format information
- isRequired boolean
- The given field is requeired or not
- labels
GetAddress Rule Contact Field Label[] 
- Label information
- language string
- Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)
- name string
- User friendly name
- formats
Sequence[ospgateway.Get Address Rule Contact Field Format] 
- Format information
- is_required bool
- The given field is requeired or not
- labels
Sequence[ospgateway.Get Address Rule Contact Field Label] 
- Label information
- language str
- Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)
- name str
- User friendly name
- formats List<Property Map>
- Format information
- isRequired Boolean
- The given field is requeired or not
- labels List<Property Map>
- Label information
- language String
- Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)
- name String
- User friendly name
GetAddressRuleContactFieldFormat     
GetAddressRuleContactFieldLabel     
GetAddressRuleTax   
- Fields
List<GetAddress Rule Tax Field> 
- Tax type rule fields
- ValueSets List<GetAddress Rule Tax Value Set> 
- Label value pair for allowed values. Used for GIRO
- Fields
[]GetAddress Rule Tax Field 
- Tax type rule fields
- ValueSets []GetAddress Rule Tax Value Set 
- Label value pair for allowed values. Used for GIRO
- fields
List<GetAddress Rule Tax Field> 
- Tax type rule fields
- valueSets List<GetAddress Rule Tax Value Set> 
- Label value pair for allowed values. Used for GIRO
- fields
GetAddress Rule Tax Field[] 
- Tax type rule fields
- valueSets GetAddress Rule Tax Value Set[] 
- Label value pair for allowed values. Used for GIRO
- fields
Sequence[ospgateway.Get Address Rule Tax Field] 
- Tax type rule fields
- value_sets Sequence[ospgateway.Get Address Rule Tax Value Set] 
- Label value pair for allowed values. Used for GIRO
- fields List<Property Map>
- Tax type rule fields
- valueSets List<Property Map>
- Label value pair for allowed values. Used for GIRO
GetAddressRuleTaxField    
- Formats
List<GetAddress Rule Tax Field Format> 
- Format information
- IsRequired bool
- The given field is requeired or not
- Labels
List<GetAddress Rule Tax Field Label> 
- Label information
- Language string
- Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)
- Name string
- User friendly name
- Formats
[]GetAddress Rule Tax Field Format 
- Format information
- IsRequired bool
- The given field is requeired or not
- Labels
[]GetAddress Rule Tax Field Label 
- Label information
- Language string
- Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)
- Name string
- User friendly name
- formats
List<GetAddress Rule Tax Field Format> 
- Format information
- isRequired Boolean
- The given field is requeired or not
- labels
List<GetAddress Rule Tax Field Label> 
- Label information
- language String
- Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)
- name String
- User friendly name
- formats
GetAddress Rule Tax Field Format[] 
- Format information
- isRequired boolean
- The given field is requeired or not
- labels
GetAddress Rule Tax Field Label[] 
- Label information
- language string
- Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)
- name string
- User friendly name
- formats
Sequence[ospgateway.Get Address Rule Tax Field Format] 
- Format information
- is_required bool
- The given field is requeired or not
- labels
Sequence[ospgateway.Get Address Rule Tax Field Label] 
- Label information
- language str
- Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)
- name str
- User friendly name
- formats List<Property Map>
- Format information
- isRequired Boolean
- The given field is requeired or not
- labels List<Property Map>
- Label information
- language String
- Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)
- name String
- User friendly name
GetAddressRuleTaxFieldFormat     
GetAddressRuleTaxFieldLabel     
GetAddressRuleTaxValueSet     
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.