logzio.Subaccount
Explore with Pulumi AI
# Subaccount Provider
Provides a Logz.io Log Management subaccount resource. This can be used to create and manage Logz.io log monitoring subaccounts.
- Learn more about accounts in the Logz.io Docs
- Learn more about available APIs for managing Logz.io 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:
- Account
Name string - Email string
- Retention
Days double - Accessible bool
- Doc
Size boolSetting - Flexible bool
- Frequency
Minutes double - Max
Daily doubleGb - Reserved
Daily doubleGb - Searchable bool
- List<double>
- Subaccount
Id string - Utilization
Enabled bool
- Account
Name string - Email string
- Retention
Days float64 - Accessible bool
- Doc
Size boolSetting - Flexible bool
- Frequency
Minutes float64 - Max
Daily float64Gb - Reserved
Daily float64Gb - Searchable bool
- []float64
- Subaccount
Id string - Utilization
Enabled bool
- account
Name String - email String
- retention
Days Double - accessible Boolean
- doc
Size BooleanSetting - flexible Boolean
- frequency
Minutes Double - max
Daily DoubleGb - reserved
Daily DoubleGb - searchable Boolean
- List<Double>
- subaccount
Id String - utilization
Enabled Boolean
- account
Name string - email string
- retention
Days number - accessible boolean
- doc
Size booleanSetting - flexible boolean
- frequency
Minutes number - max
Daily numberGb - reserved
Daily numberGb - searchable boolean
- number[]
- subaccount
Id string - utilization
Enabled boolean
- account_
name str - email str
- retention_
days float - accessible bool
- doc_
size_ boolsetting - flexible bool
- frequency_
minutes float - max_
daily_ floatgb - reserved_
daily_ floatgb - searchable bool
- Sequence[float]
- subaccount_
id str - utilization_
enabled bool
- account
Name String - email String
- retention
Days Number - accessible Boolean
- doc
Size BooleanSetting - flexible Boolean
- frequency
Minutes Number - max
Daily NumberGb - reserved
Daily NumberGb - searchable Boolean
- List<Number>
- subaccount
Id String - utilization
Enabled Boolean
Outputs
All input properties are implicitly available as output properties. Additionally, the Subaccount resource produces the following output properties:
- Account
Id double - Account
Token string - Id string
- The provider-assigned unique ID for this managed resource.
- Account
Id float64 - Account
Token string - Id string
- The provider-assigned unique ID for this managed resource.
- account
Id Double - account
Token String - id String
- The provider-assigned unique ID for this managed resource.
- account
Id number - account
Token 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.
- account
Id Number - account
Token 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.
- Accessible bool
- Account
Id double - Account
Name string - Account
Token string - Doc
Size boolSetting - Email string
- Flexible bool
- Frequency
Minutes double - Max
Daily doubleGb - Reserved
Daily doubleGb - Retention
Days double - Searchable bool
- Sharing
Objects List<double>Accounts - Subaccount
Id string - Utilization
Enabled bool
- Accessible bool
- Account
Id float64 - Account
Name string - Account
Token string - Doc
Size boolSetting - Email string
- Flexible bool
- Frequency
Minutes float64 - Max
Daily float64Gb - Reserved
Daily float64Gb - Retention
Days float64 - Searchable bool
- Sharing
Objects []float64Accounts - Subaccount
Id string - Utilization
Enabled bool
- accessible Boolean
- account
Id Double - account
Name String - account
Token String - doc
Size BooleanSetting - email String
- flexible Boolean
- frequency
Minutes Double - max
Daily DoubleGb - reserved
Daily DoubleGb - retention
Days Double - searchable Boolean
- sharing
Objects List<Double>Accounts - subaccount
Id String - utilization
Enabled Boolean
- accessible boolean
- account
Id number - account
Name string - account
Token string - doc
Size booleanSetting - email string
- flexible boolean
- frequency
Minutes number - max
Daily numberGb - reserved
Daily numberGb - retention
Days number - searchable boolean
- sharing
Objects number[]Accounts - subaccount
Id string - utilization
Enabled boolean
- accessible bool
- account_
id float - account_
name str - account_
token str - doc_
size_ boolsetting - email str
- flexible bool
- frequency_
minutes float - max_
daily_ floatgb - reserved_
daily_ floatgb - retention_
days float - searchable bool
- sharing_
objects_ Sequence[float]accounts - subaccount_
id str - utilization_
enabled bool
- accessible Boolean
- account
Id Number - account
Name String - account
Token String - doc
Size BooleanSetting - email String
- flexible Boolean
- frequency
Minutes Number - max
Daily NumberGb - reserved
Daily NumberGb - retention
Days Number - searchable Boolean
- sharing
Objects List<Number>Accounts - subaccount
Id String - utilization
Enabled Boolean
Package Details
- Repository
- logzio logzio/terraform-provider-logzio
- License
- Notes
- This Pulumi package is based on the
logzio
Terraform Provider.