1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. OspGateway
  5. getAddressRule
Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi

oci.OspGateway.getAddressRule

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 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

    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,
    });
    
    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"])
    
    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
    	})
    }
    
    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 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());
    
        }
    }
    
    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 Sequence[ospgateway.GetAddressRuleAddress]
    Address type rule information
    compartment_id str
    contacts Sequence[ospgateway.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 Sequence[ospgateway.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 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
    User friendly 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
    User friendly 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
    User friendly 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
    User friendly name
    formats Sequence[ospgateway.GetAddressRuleAddressFieldFormat]
    Format information
    is_required bool
    The given field is requeired or not
    labels Sequence[ospgateway.GetAddressRuleAddressFieldLabel]
    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

    Example string
    English translation of the label (for reference only - translation is not provided)
    Value string
    Value
    Example string
    English translation of the label (for reference only - translation is not provided)
    Value string
    Value
    example String
    English translation of the label (for reference only - translation is not provided)
    value String
    Value
    example string
    English translation of the label (for reference only - translation is not provided)
    value string
    Value
    example str
    English translation of the label (for reference only - translation is not provided)
    value str
    Value
    example String
    English translation of the label (for reference only - translation is not provided)
    value String
    Value

    GetAddressRuleAddressFieldLabel

    Example string
    English translation of the label (for reference only - translation is not provided)
    Value string
    Value
    Example string
    English translation of the label (for reference only - translation is not provided)
    Value string
    Value
    example String
    English translation of the label (for reference only - translation is not provided)
    value String
    Value
    example string
    English translation of the label (for reference only - translation is not provided)
    value string
    Value
    example str
    English translation of the label (for reference only - translation is not provided)
    value str
    Value
    example String
    English translation of the label (for reference only - translation is not provided)
    value String
    Value

    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
    User friendly 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
    User friendly 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
    User friendly 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
    User friendly name
    formats Sequence[ospgateway.GetAddressRuleContactFieldFormat]
    Format information
    is_required bool
    The given field is requeired or not
    labels Sequence[ospgateway.GetAddressRuleContactFieldLabel]
    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

    Example string
    English translation of the label (for reference only - translation is not provided)
    Value string
    Value
    Example string
    English translation of the label (for reference only - translation is not provided)
    Value string
    Value
    example String
    English translation of the label (for reference only - translation is not provided)
    value String
    Value
    example string
    English translation of the label (for reference only - translation is not provided)
    value string
    Value
    example str
    English translation of the label (for reference only - translation is not provided)
    value str
    Value
    example String
    English translation of the label (for reference only - translation is not provided)
    value String
    Value

    GetAddressRuleContactFieldLabel

    Example string
    English translation of the label (for reference only - translation is not provided)
    Value string
    Value
    Example string
    English translation of the label (for reference only - translation is not provided)
    Value string
    Value
    example String
    English translation of the label (for reference only - translation is not provided)
    value String
    Value
    example string
    English translation of the label (for reference only - translation is not provided)
    value string
    Value
    example str
    English translation of the label (for reference only - translation is not provided)
    value str
    Value
    example String
    English translation of the label (for reference only - translation is not provided)
    value String
    Value

    GetAddressRuleTax

    Fields List<GetAddressRuleTaxField>
    Tax type rule fields
    ValueSets List<GetAddressRuleTaxValueSet>
    Label value pair for allowed values. Used for GIRO
    Fields []GetAddressRuleTaxField
    Tax type rule fields
    ValueSets []GetAddressRuleTaxValueSet
    Label value pair for allowed values. Used for GIRO
    fields List<GetAddressRuleTaxField>
    Tax type rule fields
    valueSets List<GetAddressRuleTaxValueSet>
    Label value pair for allowed values. Used for GIRO
    fields GetAddressRuleTaxField[]
    Tax type rule fields
    valueSets GetAddressRuleTaxValueSet[]
    Label value pair for allowed values. Used for GIRO
    fields Sequence[ospgateway.GetAddressRuleTaxField]
    Tax type rule fields
    value_sets Sequence[ospgateway.GetAddressRuleTaxValueSet]
    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<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
    User friendly 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
    User friendly 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
    User friendly 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
    User friendly name
    formats Sequence[ospgateway.GetAddressRuleTaxFieldFormat]
    Format information
    is_required bool
    The given field is requeired or not
    labels Sequence[ospgateway.GetAddressRuleTaxFieldLabel]
    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

    Example string
    English translation of the label (for reference only - translation is not provided)
    Value string
    Value
    Example string
    English translation of the label (for reference only - translation is not provided)
    Value string
    Value
    example String
    English translation of the label (for reference only - translation is not provided)
    value String
    Value
    example string
    English translation of the label (for reference only - translation is not provided)
    value string
    Value
    example str
    English translation of the label (for reference only - translation is not provided)
    value str
    Value
    example String
    English translation of the label (for reference only - translation is not provided)
    value String
    Value

    GetAddressRuleTaxFieldLabel

    Example string
    English translation of the label (for reference only - translation is not provided)
    Value string
    Value
    Example string
    English translation of the label (for reference only - translation is not provided)
    Value string
    Value
    example String
    English translation of the label (for reference only - translation is not provided)
    value String
    Value
    example string
    English translation of the label (for reference only - translation is not provided)
    value string
    Value
    example str
    English translation of the label (for reference only - translation is not provided)
    value str
    Value
    example String
    English translation of the label (for reference only - translation is not provided)
    value String
    Value

    GetAddressRuleTaxValueSet

    Name string
    User friendly name
    Value string
    Value
    Name string
    User friendly name
    Value string
    Value
    name String
    User friendly name
    value String
    Value
    name string
    User friendly name
    value string
    Value
    name str
    User friendly name
    value str
    Value
    name String
    User friendly name
    value String
    Value

    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.31.0 published on Wednesday, Apr 10, 2024 by Pulumi