1. Packages
  2. Logzio Provider
  3. API Docs
  4. Subaccount
logzio 1.17.1 published on Monday, Apr 14, 2025 by logzio

logzio.Subaccount

Explore with Pulumi AI

logzio logo
logzio 1.17.1 published on Monday, Apr 14, 2025 by logzio

    # Subaccount Provider

    Provides a Logz.io Log Management subaccount resource. This can be used to create and manage Logz.io log monitoring subaccounts.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as logzio from "@pulumi/logzio";
    
    const config = new pulumi.Config();
    const apiToken = config.require("apiToken");
    const mySubaccount = new logzio.Subaccount("mySubaccount", {
        email: "user@logz.io",
        accountName: "test",
        retentionDays: 2,
        sharingObjectsAccounts: [12345],
        frequencyMinutes: 3,
        utilizationEnabled: true,
    });
    
    import pulumi
    import pulumi_logzio as logzio
    
    config = pulumi.Config()
    api_token = config.require("apiToken")
    my_subaccount = logzio.Subaccount("mySubaccount",
        email="user@logz.io",
        account_name="test",
        retention_days=2,
        sharing_objects_accounts=[12345],
        frequency_minutes=3,
        utilization_enabled=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/logzio/logzio"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		apiToken := cfg.Require("apiToken")
    		_, err := logzio.NewSubaccount(ctx, "mySubaccount", &logzio.SubaccountArgs{
    			Email:         pulumi.String("user@logz.io"),
    			AccountName:   pulumi.String("test"),
    			RetentionDays: pulumi.Float64(2),
    			SharingObjectsAccounts: pulumi.Float64Array{
    				pulumi.Float64(12345),
    			},
    			FrequencyMinutes:   pulumi.Float64(3),
    			UtilizationEnabled: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Logzio = Pulumi.Logzio;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var apiToken = config.Require("apiToken");
        var mySubaccount = new Logzio.Subaccount("mySubaccount", new()
        {
            Email = "user@logz.io",
            AccountName = "test",
            RetentionDays = 2,
            SharingObjectsAccounts = new[]
            {
                12345,
            },
            FrequencyMinutes = 3,
            UtilizationEnabled = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.logzio.Subaccount;
    import com.pulumi.logzio.SubaccountArgs;
    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 config = ctx.config();
            final var apiToken = config.get("apiToken");
            var mySubaccount = new Subaccount("mySubaccount", SubaccountArgs.builder()
                .email("user@logz.io")
                .accountName("test")
                .retentionDays(2)
                .sharingObjectsAccounts(12345)
                .frequencyMinutes(3)
                .utilizationEnabled(true)
                .build());
    
        }
    }
    
    configuration:
      apiToken:
        type: string
    resources:
      mySubaccount:
        type: logzio:Subaccount
        properties:
          email: user@logz.io
          accountName: test
          retentionDays: 2
          sharingObjectsAccounts:
            - 12345
          frequencyMinutes: 3
          utilizationEnabled: true
    

    Attribute Reference

    • account_id - ID of the subaccount.
    • account_token - Log shipping token for the subaccount. Learn more

    Note: The above attributes displayed only from v1.2.4. If you’re using an earlier version, please upgrade and use pulumi up -refersh to add those attributes to your existing resources.

    Import sub-accounts as resources

    You can import multiple sub-accounts as follows:

    terraform import logzio_subaccount.my_subaccount <SUBACCOUNT-ID>
    

    Endpoints used

    Create Subaccount Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Subaccount(name: string, args: SubaccountArgs, opts?: CustomResourceOptions);
    @overload
    def Subaccount(resource_name: str,
                   args: SubaccountArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def Subaccount(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   email: Optional[str] = None,
                   account_name: Optional[str] = None,
                   retention_days: Optional[float] = None,
                   max_daily_gb: Optional[float] = None,
                   flexible: Optional[bool] = None,
                   frequency_minutes: Optional[float] = None,
                   accessible: Optional[bool] = None,
                   reserved_daily_gb: Optional[float] = None,
                   doc_size_setting: Optional[bool] = None,
                   searchable: Optional[bool] = None,
                   sharing_objects_accounts: Optional[Sequence[float]] = None,
                   subaccount_id: Optional[str] = None,
                   utilization_enabled: Optional[bool] = None)
    func NewSubaccount(ctx *Context, name string, args SubaccountArgs, opts ...ResourceOption) (*Subaccount, error)
    public Subaccount(string name, SubaccountArgs args, CustomResourceOptions? opts = null)
    public Subaccount(String name, SubaccountArgs args)
    public Subaccount(String name, SubaccountArgs args, CustomResourceOptions options)
    
    type: logzio:Subaccount
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SubaccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SubaccountArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SubaccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SubaccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SubaccountArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var subaccountResource = new Logzio.Subaccount("subaccountResource", new()
    {
        Email = "string",
        AccountName = "string",
        RetentionDays = 0,
        MaxDailyGb = 0,
        Flexible = false,
        FrequencyMinutes = 0,
        Accessible = false,
        ReservedDailyGb = 0,
        DocSizeSetting = false,
        Searchable = false,
        SharingObjectsAccounts = new[]
        {
            0,
        },
        SubaccountId = "string",
        UtilizationEnabled = false,
    });
    
    example, err := logzio.NewSubaccount(ctx, "subaccountResource", &logzio.SubaccountArgs{
    	Email:            pulumi.String("string"),
    	AccountName:      pulumi.String("string"),
    	RetentionDays:    pulumi.Float64(0),
    	MaxDailyGb:       pulumi.Float64(0),
    	Flexible:         pulumi.Bool(false),
    	FrequencyMinutes: pulumi.Float64(0),
    	Accessible:       pulumi.Bool(false),
    	ReservedDailyGb:  pulumi.Float64(0),
    	DocSizeSetting:   pulumi.Bool(false),
    	Searchable:       pulumi.Bool(false),
    	SharingObjectsAccounts: pulumi.Float64Array{
    		pulumi.Float64(0),
    	},
    	SubaccountId:       pulumi.String("string"),
    	UtilizationEnabled: pulumi.Bool(false),
    })
    
    var subaccountResource = new Subaccount("subaccountResource", SubaccountArgs.builder()
        .email("string")
        .accountName("string")
        .retentionDays(0)
        .maxDailyGb(0)
        .flexible(false)
        .frequencyMinutes(0)
        .accessible(false)
        .reservedDailyGb(0)
        .docSizeSetting(false)
        .searchable(false)
        .sharingObjectsAccounts(0)
        .subaccountId("string")
        .utilizationEnabled(false)
        .build());
    
    subaccount_resource = logzio.Subaccount("subaccountResource",
        email="string",
        account_name="string",
        retention_days=0,
        max_daily_gb=0,
        flexible=False,
        frequency_minutes=0,
        accessible=False,
        reserved_daily_gb=0,
        doc_size_setting=False,
        searchable=False,
        sharing_objects_accounts=[0],
        subaccount_id="string",
        utilization_enabled=False)
    
    const subaccountResource = new logzio.Subaccount("subaccountResource", {
        email: "string",
        accountName: "string",
        retentionDays: 0,
        maxDailyGb: 0,
        flexible: false,
        frequencyMinutes: 0,
        accessible: false,
        reservedDailyGb: 0,
        docSizeSetting: false,
        searchable: false,
        sharingObjectsAccounts: [0],
        subaccountId: "string",
        utilizationEnabled: false,
    });
    
    type: logzio:Subaccount
    properties:
        accessible: false
        accountName: string
        docSizeSetting: false
        email: string
        flexible: false
        frequencyMinutes: 0
        maxDailyGb: 0
        reservedDailyGb: 0
        retentionDays: 0
        searchable: false
        sharingObjectsAccounts:
            - 0
        subaccountId: string
        utilizationEnabled: false
    

    Subaccount Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Subaccount resource accepts the following input properties:

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Subaccount resource produces the following output properties:

    AccountId double
    AccountToken string
    Id string
    The provider-assigned unique ID for this managed resource.
    AccountId float64
    AccountToken string
    Id string
    The provider-assigned unique ID for this managed resource.
    accountId Double
    accountToken String
    id String
    The provider-assigned unique ID for this managed resource.
    accountId number
    accountToken string
    id string
    The provider-assigned unique ID for this managed resource.
    account_id float
    account_token str
    id str
    The provider-assigned unique ID for this managed resource.
    accountId Number
    accountToken String
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Subaccount Resource

    Get an existing Subaccount resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SubaccountState, opts?: CustomResourceOptions): Subaccount
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            accessible: Optional[bool] = None,
            account_id: Optional[float] = None,
            account_name: Optional[str] = None,
            account_token: Optional[str] = None,
            doc_size_setting: Optional[bool] = None,
            email: Optional[str] = None,
            flexible: Optional[bool] = None,
            frequency_minutes: Optional[float] = None,
            max_daily_gb: Optional[float] = None,
            reserved_daily_gb: Optional[float] = None,
            retention_days: Optional[float] = None,
            searchable: Optional[bool] = None,
            sharing_objects_accounts: Optional[Sequence[float]] = None,
            subaccount_id: Optional[str] = None,
            utilization_enabled: Optional[bool] = None) -> Subaccount
    func GetSubaccount(ctx *Context, name string, id IDInput, state *SubaccountState, opts ...ResourceOption) (*Subaccount, error)
    public static Subaccount Get(string name, Input<string> id, SubaccountState? state, CustomResourceOptions? opts = null)
    public static Subaccount get(String name, Output<String> id, SubaccountState state, CustomResourceOptions options)
    resources:  _:    type: logzio:Subaccount    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:

    Package Details

    Repository
    logzio logzio/terraform-provider-logzio
    License
    Notes
    This Pulumi package is based on the logzio Terraform Provider.
    logzio logo
    logzio 1.17.1 published on Monday, Apr 14, 2025 by logzio