1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. OspGateway
  5. getAddressRule
Oracle Cloud Infrastructure v1.10.0 published on Thursday, Sep 7, 2023 by Pulumi

oci.OspGateway.getAddressRule

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.10.0 published on Thursday, Sep 7, 2023 by Pulumi

    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

    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 = @var.Compartment_id,
            CountryCode = @var.Address_rule_country_code,
            OspHomeRegion = @var.Address_rule_osp_home_region,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/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: _var.Compartment_id,
    			CountryCode:   _var.Address_rule_country_code,
    			OspHomeRegion: _var.Address_rule_osp_home_region,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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(var_.compartment_id())
                .countryCode(var_.address_rule_country_code())
                .ospHomeRegion(var_.address_rule_osp_home_region())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_oci as oci
    
    test_address_rule = oci.OspGateway.get_address_rule(compartment_id=var["compartment_id"],
        country_code=var["address_rule_country_code"],
        osp_home_region=var["address_rule_osp_home_region"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testAddressRule = oci.OspGateway.getAddressRule({
        compartmentId: _var.compartment_id,
        countryCode: _var.address_rule_country_code,
        ospHomeRegion: _var.address_rule_osp_home_region,
    });
    
    variables:
      testAddressRule:
        fn::invoke:
          Function: oci:OspGateway:getAddressRule
          Arguments:
            compartmentId: ${var.compartment_id}
            countryCode: ${var.address_rule_country_code}
            ospHomeRegion: ${var.address_rule_osp_home_region}
    

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

    The 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.

    OspHomeRegion string

    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.

    OspHomeRegion string

    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.

    ospHomeRegion String

    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.

    ospHomeRegion string

    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_region str

    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.

    ospHomeRegion String

    The home region's public name of the logged in user.

    getAddressRule Result

    The following output properties are available:

    Addresses List<GetAddressRuleAddress>

    Address type rule information

    CompartmentId string
    Contacts List<GetAddressRuleContact>

    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.

    OspHomeRegion string
    Taxes List<GetAddressRuleTax>

    Tax type rule information

    Addresses []GetAddressRuleAddress

    Address type rule information

    CompartmentId string
    Contacts []GetAddressRuleContact

    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.

    OspHomeRegion string
    Taxes []GetAddressRuleTax

    Tax type rule information

    addresses List<GetAddressRuleAddress>

    Address type rule information

    compartmentId String
    contacts List<GetAddressRuleContact>

    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.

    ospHomeRegion String
    taxes List<GetAddressRuleTax>

    Tax type rule information

    addresses GetAddressRuleAddress[]

    Address type rule information

    compartmentId string
    contacts GetAddressRuleContact[]

    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.

    ospHomeRegion string
    taxes GetAddressRuleTax[]

    Tax type rule information

    addresses GetAddressRuleAddress]

    Address type rule information

    compartment_id str
    contacts GetAddressRuleContact]

    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_region str
    taxes GetAddressRuleTax]

    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.

    ospHomeRegion String
    taxes List<Property Map>

    Tax type rule information

    Supporting Types

    GetAddressRuleAddress

    Fields List<GetAddressRuleAddressField>

    Tax type rule fields

    ThirdPartyValidation string

    Third party validation.

    Fields []GetAddressRuleAddressField

    Tax type rule fields

    ThirdPartyValidation string

    Third party validation.

    fields List<GetAddressRuleAddressField>

    Tax type rule fields

    thirdPartyValidation String

    Third party validation.

    fields GetAddressRuleAddressField[]

    Tax type rule fields

    thirdPartyValidation string

    Third party validation.

    fields GetAddressRuleAddressField]

    Tax type rule fields

    third_party_validation str

    Third party validation.

    fields List<Property Map>

    Tax type rule fields

    thirdPartyValidation String

    Third party validation.

    GetAddressRuleAddressField

    Formats List<GetAddressRuleAddressFieldFormat>

    Format information

    IsRequired bool

    The given field is requeired or not

    Labels List<GetAddressRuleAddressFieldLabel>

    Label information

    Language string

    Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)

    Name string

    The field name

    Formats []GetAddressRuleAddressFieldFormat

    Format information

    IsRequired bool

    The given field is requeired or not

    Labels []GetAddressRuleAddressFieldLabel

    Label information

    Language string

    Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)

    Name string

    The field name

    formats List<GetAddressRuleAddressFieldFormat>

    Format information

    isRequired Boolean

    The given field is requeired or not

    labels List<GetAddressRuleAddressFieldLabel>

    Label information

    language String

    Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)

    name String

    The field name

    formats GetAddressRuleAddressFieldFormat[]

    Format information

    isRequired boolean

    The given field is requeired or not

    labels GetAddressRuleAddressFieldLabel[]

    Label information

    language string

    Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)

    name string

    The field name

    formats GetAddressRuleAddressFieldFormat]

    Format information

    is_required bool

    The given field is requeired or not

    labels GetAddressRuleAddressFieldLabel]

    Label information

    language str

    Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)

    name str

    The field 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

    The field name

    GetAddressRuleAddressFieldFormat

    Example string

    English translation of the label (for reference only - translation is not provided)

    Value string

    Language token of the required label

    Example string

    English translation of the label (for reference only - translation is not provided)

    Value string

    Language token of the required label

    example String

    English translation of the label (for reference only - translation is not provided)

    value String

    Language token of the required label

    example string

    English translation of the label (for reference only - translation is not provided)

    value string

    Language token of the required label

    example str

    English translation of the label (for reference only - translation is not provided)

    value str

    Language token of the required label

    example String

    English translation of the label (for reference only - translation is not provided)

    value String

    Language token of the required label

    GetAddressRuleAddressFieldLabel

    Example string

    English translation of the label (for reference only - translation is not provided)

    Value string

    Language token of the required label

    Example string

    English translation of the label (for reference only - translation is not provided)

    Value string

    Language token of the required label

    example String

    English translation of the label (for reference only - translation is not provided)

    value String

    Language token of the required label

    example string

    English translation of the label (for reference only - translation is not provided)

    value string

    Language token of the required label

    example str

    English translation of the label (for reference only - translation is not provided)

    value str

    Language token of the required label

    example String

    English translation of the label (for reference only - translation is not provided)

    value String

    Language token of the required label

    GetAddressRuleContact

    fields List<Property Map>

    Tax type rule fields

    GetAddressRuleContactField

    Formats List<GetAddressRuleContactFieldFormat>

    Format information

    IsRequired bool

    The given field is requeired or not

    Labels List<GetAddressRuleContactFieldLabel>

    Label information

    Language string

    Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)

    Name string

    The field name

    Formats []GetAddressRuleContactFieldFormat

    Format information

    IsRequired bool

    The given field is requeired or not

    Labels []GetAddressRuleContactFieldLabel

    Label information

    Language string

    Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)

    Name string

    The field name

    formats List<GetAddressRuleContactFieldFormat>

    Format information

    isRequired Boolean

    The given field is requeired or not

    labels List<GetAddressRuleContactFieldLabel>

    Label information

    language String

    Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)

    name String

    The field name

    formats GetAddressRuleContactFieldFormat[]

    Format information

    isRequired boolean

    The given field is requeired or not

    labels GetAddressRuleContactFieldLabel[]

    Label information

    language string

    Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)

    name string

    The field name

    formats GetAddressRuleContactFieldFormat]

    Format information

    is_required bool

    The given field is requeired or not

    labels GetAddressRuleContactFieldLabel]

    Label information

    language str

    Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)

    name str

    The field 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

    The field name

    GetAddressRuleContactFieldFormat

    Example string

    English translation of the label (for reference only - translation is not provided)

    Value string

    Language token of the required label

    Example string

    English translation of the label (for reference only - translation is not provided)

    Value string

    Language token of the required label

    example String

    English translation of the label (for reference only - translation is not provided)

    value String

    Language token of the required label

    example string

    English translation of the label (for reference only - translation is not provided)

    value string

    Language token of the required label

    example str

    English translation of the label (for reference only - translation is not provided)

    value str

    Language token of the required label

    example String

    English translation of the label (for reference only - translation is not provided)

    value String

    Language token of the required label

    GetAddressRuleContactFieldLabel

    Example string

    English translation of the label (for reference only - translation is not provided)

    Value string

    Language token of the required label

    Example string

    English translation of the label (for reference only - translation is not provided)

    Value string

    Language token of the required label

    example String

    English translation of the label (for reference only - translation is not provided)

    value String

    Language token of the required label

    example string

    English translation of the label (for reference only - translation is not provided)

    value string

    Language token of the required label

    example str

    English translation of the label (for reference only - translation is not provided)

    value str

    Language token of the required label

    example String

    English translation of the label (for reference only - translation is not provided)

    value String

    Language token of the required label

    GetAddressRuleTax

    Fields []GetAddressRuleTaxField

    Tax type rule fields

    fields GetAddressRuleTaxField[]

    Tax type rule fields

    fields GetAddressRuleTaxField]

    Tax type rule fields

    fields List<Property Map>

    Tax type rule fields

    GetAddressRuleTaxField

    Formats List<GetAddressRuleTaxFieldFormat>

    Format information

    IsRequired bool

    The given field is requeired or not

    Labels List<GetAddressRuleTaxFieldLabel>

    Label information

    Language string

    Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)

    Name string

    The field name

    Formats []GetAddressRuleTaxFieldFormat

    Format information

    IsRequired bool

    The given field is requeired or not

    Labels []GetAddressRuleTaxFieldLabel

    Label information

    Language string

    Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)

    Name string

    The field name

    formats List<GetAddressRuleTaxFieldFormat>

    Format information

    isRequired Boolean

    The given field is requeired or not

    labels List<GetAddressRuleTaxFieldLabel>

    Label information

    language String

    Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)

    name String

    The field name

    formats GetAddressRuleTaxFieldFormat[]

    Format information

    isRequired boolean

    The given field is requeired or not

    labels GetAddressRuleTaxFieldLabel[]

    Label information

    language string

    Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)

    name string

    The field name

    formats GetAddressRuleTaxFieldFormat]

    Format information

    is_required bool

    The given field is requeired or not

    labels GetAddressRuleTaxFieldLabel]

    Label information

    language str

    Locale code (rfc4646 format) of a forced language (e.g.: jp addresses require jp always)

    name str

    The field 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

    The field name

    GetAddressRuleTaxFieldFormat

    Example string

    English translation of the label (for reference only - translation is not provided)

    Value string

    Language token of the required label

    Example string

    English translation of the label (for reference only - translation is not provided)

    Value string

    Language token of the required label

    example String

    English translation of the label (for reference only - translation is not provided)

    value String

    Language token of the required label

    example string

    English translation of the label (for reference only - translation is not provided)

    value string

    Language token of the required label

    example str

    English translation of the label (for reference only - translation is not provided)

    value str

    Language token of the required label

    example String

    English translation of the label (for reference only - translation is not provided)

    value String

    Language token of the required label

    GetAddressRuleTaxFieldLabel

    Example string

    English translation of the label (for reference only - translation is not provided)

    Value string

    Language token of the required label

    Example string

    English translation of the label (for reference only - translation is not provided)

    Value string

    Language token of the required label

    example String

    English translation of the label (for reference only - translation is not provided)

    value String

    Language token of the required label

    example string

    English translation of the label (for reference only - translation is not provided)

    value string

    Language token of the required label

    example str

    English translation of the label (for reference only - translation is not provided)

    value str

    Language token of the required label

    example String

    English translation of the label (for reference only - translation is not provided)

    value String

    Language token of the required label

    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.10.0 published on Thursday, Sep 7, 2023 by Pulumi