routeros.UserManagerProfileLimitation
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as routeros from "@pulumi/routeros";
const testUserManagerLimitation = new routeros.UserManagerLimitation("testUserManagerLimitation", {
downloadLimit: 1024,
uploadLimit: 1024,
uptimeLimit: "10d",
});
const testUserManagerProfile = new routeros.UserManagerProfile("testUserManagerProfile", {
nameForUsers: "Test",
price: 0.02,
});
const weekendNight = new routeros.UserManagerProfileLimitation("weekendNight", {
limitation: testUserManagerLimitation.name,
profile: testUserManagerProfile.name,
fromTime: "0s",
tillTime: "6h",
weekdays: [
"sunday",
"saturday",
],
});
import pulumi
import pulumi_routeros as routeros
test_user_manager_limitation = routeros.UserManagerLimitation("testUserManagerLimitation",
download_limit=1024,
upload_limit=1024,
uptime_limit="10d")
test_user_manager_profile = routeros.UserManagerProfile("testUserManagerProfile",
name_for_users="Test",
price=0.02)
weekend_night = routeros.UserManagerProfileLimitation("weekendNight",
limitation=test_user_manager_limitation.name,
profile=test_user_manager_profile.name,
from_time="0s",
till_time="6h",
weekdays=[
"sunday",
"saturday",
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/routeros/routeros"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testUserManagerLimitation, err := routeros.NewUserManagerLimitation(ctx, "testUserManagerLimitation", &routeros.UserManagerLimitationArgs{
DownloadLimit: pulumi.Float64(1024),
UploadLimit: pulumi.Float64(1024),
UptimeLimit: pulumi.String("10d"),
})
if err != nil {
return err
}
testUserManagerProfile, err := routeros.NewUserManagerProfile(ctx, "testUserManagerProfile", &routeros.UserManagerProfileArgs{
NameForUsers: pulumi.String("Test"),
Price: pulumi.Float64(0.02),
})
if err != nil {
return err
}
_, err = routeros.NewUserManagerProfileLimitation(ctx, "weekendNight", &routeros.UserManagerProfileLimitationArgs{
Limitation: testUserManagerLimitation.Name,
Profile: testUserManagerProfile.Name,
FromTime: pulumi.String("0s"),
TillTime: pulumi.String("6h"),
Weekdays: pulumi.StringArray{
pulumi.String("sunday"),
pulumi.String("saturday"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Routeros = Pulumi.Routeros;
return await Deployment.RunAsync(() =>
{
var testUserManagerLimitation = new Routeros.UserManagerLimitation("testUserManagerLimitation", new()
{
DownloadLimit = 1024,
UploadLimit = 1024,
UptimeLimit = "10d",
});
var testUserManagerProfile = new Routeros.UserManagerProfile("testUserManagerProfile", new()
{
NameForUsers = "Test",
Price = 0.02,
});
var weekendNight = new Routeros.UserManagerProfileLimitation("weekendNight", new()
{
Limitation = testUserManagerLimitation.Name,
Profile = testUserManagerProfile.Name,
FromTime = "0s",
TillTime = "6h",
Weekdays = new[]
{
"sunday",
"saturday",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.routeros.UserManagerLimitation;
import com.pulumi.routeros.UserManagerLimitationArgs;
import com.pulumi.routeros.UserManagerProfile;
import com.pulumi.routeros.UserManagerProfileArgs;
import com.pulumi.routeros.UserManagerProfileLimitation;
import com.pulumi.routeros.UserManagerProfileLimitationArgs;
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) {
var testUserManagerLimitation = new UserManagerLimitation("testUserManagerLimitation", UserManagerLimitationArgs.builder()
.downloadLimit(1024)
.uploadLimit(1024)
.uptimeLimit("10d")
.build());
var testUserManagerProfile = new UserManagerProfile("testUserManagerProfile", UserManagerProfileArgs.builder()
.nameForUsers("Test")
.price(0.02)
.build());
var weekendNight = new UserManagerProfileLimitation("weekendNight", UserManagerProfileLimitationArgs.builder()
.limitation(testUserManagerLimitation.name())
.profile(testUserManagerProfile.name())
.fromTime("0s")
.tillTime("6h")
.weekdays(
"sunday",
"saturday")
.build());
}
}
resources:
testUserManagerLimitation:
type: routeros:UserManagerLimitation
properties:
downloadLimit: 1024
uploadLimit: 1024
uptimeLimit: 10d
testUserManagerProfile:
type: routeros:UserManagerProfile
properties:
nameForUsers: Test
price: 0.02
weekendNight:
type: routeros:UserManagerProfileLimitation
properties:
limitation: ${testUserManagerLimitation.name}
profile: ${testUserManagerProfile.name}
fromTime: 0s
tillTime: 6h
weekdays:
- sunday
- saturday
Create UserManagerProfileLimitation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new UserManagerProfileLimitation(name: string, args: UserManagerProfileLimitationArgs, opts?: CustomResourceOptions);
@overload
def UserManagerProfileLimitation(resource_name: str,
args: UserManagerProfileLimitationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def UserManagerProfileLimitation(resource_name: str,
opts: Optional[ResourceOptions] = None,
limitation: Optional[str] = None,
profile: Optional[str] = None,
___id_: Optional[float] = None,
___path_: Optional[str] = None,
from_time: Optional[str] = None,
till_time: Optional[str] = None,
user_manager_profile_limitation_id: Optional[str] = None,
weekdays: Optional[Sequence[str]] = None)
func NewUserManagerProfileLimitation(ctx *Context, name string, args UserManagerProfileLimitationArgs, opts ...ResourceOption) (*UserManagerProfileLimitation, error)
public UserManagerProfileLimitation(string name, UserManagerProfileLimitationArgs args, CustomResourceOptions? opts = null)
public UserManagerProfileLimitation(String name, UserManagerProfileLimitationArgs args)
public UserManagerProfileLimitation(String name, UserManagerProfileLimitationArgs args, CustomResourceOptions options)
type: routeros:UserManagerProfileLimitation
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 UserManagerProfileLimitationArgs
- 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 UserManagerProfileLimitationArgs
- 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 UserManagerProfileLimitationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserManagerProfileLimitationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UserManagerProfileLimitationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
UserManagerProfileLimitation 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 UserManagerProfileLimitation resource accepts the following input properties:
- Limitation string
- The limitation name.
- Profile string
- The profile name.
- From
Time string - Time of the day when the limitation should take place.
- Till
Time string - Time of the day when the limitation should end.
- User
Manager stringProfile Limitation Id - The ID of this resource.
- Weekdays List<string>
- Days of the week when the limitation is active.
- ___
id_ double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- Limitation string
- The limitation name.
- Profile string
- The profile name.
- From
Time string - Time of the day when the limitation should take place.
- Till
Time string - Time of the day when the limitation should end.
- User
Manager stringProfile Limitation Id - The ID of this resource.
- Weekdays []string
- Days of the week when the limitation is active.
- ___
id_ float64 - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- limitation String
- The limitation name.
- profile String
- The profile name.
- ___
id_ Double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- from
Time String - Time of the day when the limitation should take place.
- till
Time String - Time of the day when the limitation should end.
- user
Manager StringProfile Limitation Id - The ID of this resource.
- weekdays List<String>
- Days of the week when the limitation is active.
- limitation string
- The limitation name.
- profile string
- The profile name.
- ___
id_ number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- from
Time string - Time of the day when the limitation should take place.
- till
Time string - Time of the day when the limitation should end.
- user
Manager stringProfile Limitation Id - The ID of this resource.
- weekdays string[]
- Days of the week when the limitation is active.
- limitation str
- The limitation name.
- profile str
- The profile name.
- ___
id_ float - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ str - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- from_
time str - Time of the day when the limitation should take place.
- till_
time str - Time of the day when the limitation should end.
- user_
manager_ strprofile_ limitation_ id - The ID of this resource.
- weekdays Sequence[str]
- Days of the week when the limitation is active.
- limitation String
- The limitation name.
- profile String
- The profile name.
- ___
id_ Number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- from
Time String - Time of the day when the limitation should take place.
- till
Time String - Time of the day when the limitation should end.
- user
Manager StringProfile Limitation Id - The ID of this resource.
- weekdays List<String>
- Days of the week when the limitation is active.
Outputs
All input properties are implicitly available as output properties. Additionally, the UserManagerProfileLimitation resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing UserManagerProfileLimitation Resource
Get an existing UserManagerProfileLimitation 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?: UserManagerProfileLimitationState, opts?: CustomResourceOptions): UserManagerProfileLimitation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
___id_: Optional[float] = None,
___path_: Optional[str] = None,
from_time: Optional[str] = None,
limitation: Optional[str] = None,
profile: Optional[str] = None,
till_time: Optional[str] = None,
user_manager_profile_limitation_id: Optional[str] = None,
weekdays: Optional[Sequence[str]] = None) -> UserManagerProfileLimitation
func GetUserManagerProfileLimitation(ctx *Context, name string, id IDInput, state *UserManagerProfileLimitationState, opts ...ResourceOption) (*UserManagerProfileLimitation, error)
public static UserManagerProfileLimitation Get(string name, Input<string> id, UserManagerProfileLimitationState? state, CustomResourceOptions? opts = null)
public static UserManagerProfileLimitation get(String name, Output<String> id, UserManagerProfileLimitationState state, CustomResourceOptions options)
resources: _: type: routeros:UserManagerProfileLimitation 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.
- From
Time string - Time of the day when the limitation should take place.
- Limitation string
- The limitation name.
- Profile string
- The profile name.
- Till
Time string - Time of the day when the limitation should end.
- User
Manager stringProfile Limitation Id - The ID of this resource.
- Weekdays List<string>
- Days of the week when the limitation is active.
- ___
id_ double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- From
Time string - Time of the day when the limitation should take place.
- Limitation string
- The limitation name.
- Profile string
- The profile name.
- Till
Time string - Time of the day when the limitation should end.
- User
Manager stringProfile Limitation Id - The ID of this resource.
- Weekdays []string
- Days of the week when the limitation is active.
- ___
id_ float64 - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- ___
id_ Double - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- from
Time String - Time of the day when the limitation should take place.
- limitation String
- The limitation name.
- profile String
- The profile name.
- till
Time String - Time of the day when the limitation should end.
- user
Manager StringProfile Limitation Id - The ID of this resource.
- weekdays List<String>
- Days of the week when the limitation is active.
- ___
id_ number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ string - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- from
Time string - Time of the day when the limitation should take place.
- limitation string
- The limitation name.
- profile string
- The profile name.
- till
Time string - Time of the day when the limitation should end.
- user
Manager stringProfile Limitation Id - The ID of this resource.
- weekdays string[]
- Days of the week when the limitation is active.
- ___
id_ float - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ str - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- from_
time str - Time of the day when the limitation should take place.
- limitation str
- The limitation name.
- profile str
- The profile name.
- till_
time str - Time of the day when the limitation should end.
- user_
manager_ strprofile_ limitation_ id - The ID of this resource.
- weekdays Sequence[str]
- Days of the week when the limitation is active.
- ___
id_ Number - Resource ID type (.id / name). This is an internal service field, setting a value is not required.
- ___
path_ String - Resource path for CRUD operations. This is an internal service field, setting a value is not required.
- from
Time String - Time of the day when the limitation should take place.
- limitation String
- The limitation name.
- profile String
- The profile name.
- till
Time String - Time of the day when the limitation should end.
- user
Manager StringProfile Limitation Id - The ID of this resource.
- weekdays List<String>
- Days of the week when the limitation is active.
Import
#The ID can be found via API or the terminal
#The command for the terminal is -> :put [/user-manager/profile-limitation get [print show-ids]]
$ pulumi import routeros:index/userManagerProfileLimitation:UserManagerProfileLimitation weekend_night '*1'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- routeros terraform-routeros/terraform-provider-routeros
- License
- Notes
- This Pulumi package is based on the
routeros
Terraform Provider.