GS2-Deploy/CDK Reference of GS2-Identifier
Entity
Resources operated in Deploy process
User
GS2-Identifier User
This entity represents the game developer who has access to the project.
The user has credentials for programmatic access and A password can be registered that allows the user to log into the Management Console and manage the project based on the user’s permissions.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 1024 chars | User GRN | ||
| name | string | ✓ | ~ 128 chars | username | ||
| description | string | ~ 1024 chars | Description | |||
| createdAt | long | ✓ | Now | Datetime of creation Unix time, milliseconds Automatically configured on the server | ||
| updatedAt | long | ✓ | Now | Datetime of last update Unix time, milliseconds Automatically configured on the server | ||
| revision | long | 0 | 0 ~ 9223372036854775805 | Revision |
GetAttr
Generation results of resources that can be obtained with the !GetAttr tag
| Type | Description | |
|---|---|---|
| Item | User | Created User |
Implementation Example
Type: GS2::Identifier::User
Properties:
Name: user-0001
Description: nullimport (
"github.com/gs2io/gs2-golang-cdk/core"
"github.com/gs2io/gs2-golang-cdk/identifier"
"github.com/openlyinc/pointy"
)
SampleStack := core.NewStack()
identifier.NewUser(
&SampleStack,
"user-0001",
identifier.UserOptions{},
)
println(SampleStack.Yaml()) // Generate Template
class SampleStack extends \Gs2Cdk\Core\Model\Stack
{
function __construct() {
parent::__construct();
new \Gs2Cdk\Identifier\Model\User(
stack: $this,
name: "user-0001"
);
}
}
print((new SampleStack())->yaml()); // Generate Template
class SampleStack extends io.gs2.cdk.core.model.Stack
{
public SampleStack() {
super();
new io.gs2.cdk.identifier.model.User(
this,
"user-0001"
);
}
}
System.out.println(new SampleStack().yaml()); // Generate Templatepublic class SampleStack : Gs2Cdk.Core.Model.Stack
{
public SampleStack() {
new Gs2Cdk.Gs2Identifier.Model.User(
stack: this,
name: "user-0001"
);
}
}
Debug.Log(new SampleStack().Yaml()); // Generate Templateimport core from "@/gs2cdk/core";
import identifier from "@/gs2cdk/identifier";
class SampleStack extends core.Stack
{
public constructor() {
super();
new identifier.model.User(
this,
"user-0001"
);
}
}
console.log(new SampleStack().yaml()); // Generate Template
from gs2_cdk import Stack, core, identifier
class SampleStack(Stack):
def __init__(self):
super().__init__()
identifier.User(
stack=self,
name='user-0001',
)
print(SampleStack().yaml()) # Generate TemplateSecurityPolicy
Security Policy
Define restrictions on the types of APIs that users can use and the resources they can access. Access restriction rules are defined using JSON format definition data called policy documents. For the specifications of policy documents, please refer to the explanation page on policy documents in the development documents.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| securityPolicyId | string | ✓ | ~ 1024 chars | Security Policy GRN | ||
| name | string | ✓ | ~ 128 chars | Security Policy Name | ||
| description | string | ~ 1024 chars | Description | |||
| policy | string | ✓ | ~ 524288 chars | Policy Document | ||
| createdAt | long | ✓ | Now | Datetime of creation Unix time, milliseconds Automatically configured on the server | ||
| updatedAt | long | ✓ | Now | Datetime of last update Unix time, milliseconds Automatically configured on the server |
GetAttr
Generation results of resources that can be obtained with the !GetAttr tag
| Type | Description | |
|---|---|---|
| Item | SecurityPolicy | Created security policy |
Implementation Example
Type: GS2::Identifier::SecurityPolicy
Properties:
Name: policy-0001
Description: null
Policy: {}import (
"github.com/gs2io/gs2-golang-cdk/core"
"github.com/gs2io/gs2-golang-cdk/identifier"
"github.com/openlyinc/pointy"
)
SampleStack := core.NewStack()
identifier.NewSecurityPolicy(
&SampleStack,
"policy-0001",
identifier.NewPolicy(
[]identifier.Statement{},
),
identifier.SecurityPolicyOptions{},
)
println(SampleStack.Yaml()) // Generate Template
class SampleStack extends \Gs2Cdk\Core\Model\Stack
{
function __construct() {
parent::__construct();
new \Gs2Cdk\Identifier\Model\SecurityPolicy(
stack: $this,
name: "policy-0001",
policy: new \Gs2Cdk\Identifier\Model\Policy([])
);
}
}
print((new SampleStack())->yaml()); // Generate Template
class SampleStack extends io.gs2.cdk.core.model.Stack
{
public SampleStack() {
super();
new io.gs2.cdk.identifier.model.SecurityPolicy(
this,
"policy-0001",
null
);
}
}
System.out.println(new SampleStack().yaml()); // Generate Templatepublic class SampleStack : Gs2Cdk.Core.Model.Stack
{
public SampleStack() {
new Gs2Cdk.Gs2Identifier.Model.SecurityPolicy(
stack: this,
name: "policy-0001",
policy: null
);
}
}
Debug.Log(new SampleStack().Yaml()); // Generate Templateimport core from "@/gs2cdk/core";
import identifier from "@/gs2cdk/identifier";
import Policy from "@/gs2cdk/identifier/model/Policy";
import Statement from "@/gs2cdk/identifier/model/Statement";
class SampleStack extends core.Stack
{
public constructor() {
super();
new identifier.model.SecurityPolicy(
this,
"policy-0001",
new Policy(
[
Statement.allowAll()
]
)
);
}
}
console.log(new SampleStack().yaml()); // Generate Template
from gs2_cdk import Stack, core, identifier
class SampleStack(Stack):
def __init__(self):
super().__init__()
identifier.SecurityPolicy(
stack=self,
name='policy-0001',
policy=None,
)
print(SampleStack().yaml()) # Generate TemplateIdentifier
Credential
An API key is required to access GS2’s API. A credential consists of a client ID and a client secret, and access using the credential is restricted based on the privileges of the user who owns the credential.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| clientId | string | ✓ | UUID | ~ 256 chars | Client ID | |
| userName | string | ✓ | ~ 128 chars | username | ||
| clientSecret | string | ✓ | UUID | ~ 100 chars | Client Secret | |
| createdAt | long | ✓ | Now | Datetime of creation Unix time, milliseconds Automatically configured on the server | ||
| revision | long | 0 | 0 ~ 9223372036854775805 | Revision |
GetAttr
Generation results of resources that can be obtained with the !GetAttr tag
| Type | Description | |
|---|---|---|
| Item | Identifier | Credentials created |
| ClientSecret | string | Client Secret |
Implementation Example
Type: GS2::Identifier::Identifier
Properties:
UserName: user-0001import (
"github.com/gs2io/gs2-golang-cdk/core"
"github.com/gs2io/gs2-golang-cdk/identifier"
"github.com/openlyinc/pointy"
)
SampleStack := core.NewStack()
identifier.NewIdentifier(
&SampleStack,
"user-0001",
identifier.IdentifierOptions{},
)
println(SampleStack.Yaml()) // Generate Template
class SampleStack extends \Gs2Cdk\Core\Model\Stack
{
function __construct() {
parent::__construct();
new \Gs2Cdk\Identifier\Model\Identifier(
stack: $this,
userName: "user-0001"
);
}
}
print((new SampleStack())->yaml()); // Generate Template
class SampleStack extends io.gs2.cdk.core.model.Stack
{
public SampleStack() {
super();
new io.gs2.cdk.identifier.model.Identifier(
this,
"user-0001"
);
}
}
System.out.println(new SampleStack().yaml()); // Generate Templatepublic class SampleStack : Gs2Cdk.Core.Model.Stack
{
public SampleStack() {
new Gs2Cdk.Gs2Identifier.Model.Identifier(
stack: this,
userName: "user-0001"
);
}
}
Debug.Log(new SampleStack().Yaml()); // Generate Templateimport core from "@/gs2cdk/core";
import identifier from "@/gs2cdk/identifier";
class SampleStack extends core.Stack
{
public constructor() {
super();
new identifier.model.Identifier(
this,
"user-0001"
);
}
}
console.log(new SampleStack().yaml()); // Generate Template
from gs2_cdk import Stack, core, identifier
class SampleStack(Stack):
def __init__(self):
super().__init__()
identifier.Identifier(
stack=self,
user_name='user-0001',
)
print(SampleStack().yaml()) # Generate TemplatePassword
Password
Password for logging into the Management Console based on user permissions. A password allows different accounts to log in to a single project and still limit the information they have access to.
| Type | Condition | Required | Default | Value Limits | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| passwordId | string | ✓ | ~ 1024 chars | Password GRN | ||||||||
| userId | string | ✓ | ~ 1024 chars | User GRN | ||||||||
| userName | string | ✓ | ~ 128 chars | username | ||||||||
| enableTwoFactorAuthentication | String Enum enum { “RFC6238”, “Disable” } | ✓ | “Disable” | ~ 128 chars | Two-factor authentication
| |||||||
| twoFactorAuthenticationSetting | TwoFactorAuthenticationSetting | {enableTwoFactorAuthentication} == “RFC6238” | Two-factor authentication setting * Enabled if enableTwoFactorAuthentication is “RFC6238” | |||||||||
| createdAt | long | ✓ | Now | Datetime of creation Unix time, milliseconds Automatically configured on the server | ||||||||
| revision | long | 0 | 0 ~ 9223372036854775805 | Revision |
GetAttr
Generation results of resources that can be obtained with the !GetAttr tag
| Type | Description | |
|---|---|---|
| Item | Password | Password created |
Implementation Example
Type: GS2::Identifier::Password
Properties:
UserName: user-0001
Password: password-0001import (
"github.com/gs2io/gs2-golang-cdk/core"
"github.com/gs2io/gs2-golang-cdk/identifier"
"github.com/openlyinc/pointy"
)
SampleStack := core.NewStack()
identifier.NewPassword(
&SampleStack,
"user-0001",
"password-0001",
identifier.PasswordOptions{},
)
println(SampleStack.Yaml()) // Generate Template
class SampleStack extends \Gs2Cdk\Core\Model\Stack
{
function __construct() {
parent::__construct();
new \Gs2Cdk\Identifier\Model\Password(
stack: $this,
userName: "user-0001",
password: "password-0001"
);
}
}
print((new SampleStack())->yaml()); // Generate Template
class SampleStack extends io.gs2.cdk.core.model.Stack
{
public SampleStack() {
super();
new io.gs2.cdk.identifier.model.Password(
this,
"user-0001",
"password-0001"
);
}
}
System.out.println(new SampleStack().yaml()); // Generate Templatepublic class SampleStack : Gs2Cdk.Core.Model.Stack
{
public SampleStack() {
new Gs2Cdk.Gs2Identifier.Model.Password(
stack: this,
userName: "user-0001",
password: "password-0001"
);
}
}
Debug.Log(new SampleStack().Yaml()); // Generate Templateimport core from "@/gs2cdk/core";
import identifier from "@/gs2cdk/identifier";
class SampleStack extends core.Stack
{
public constructor() {
super();
new identifier.model.Password(
this,
"user-0001",
"password-0001"
);
}
}
console.log(new SampleStack().yaml()); // Generate Template
from gs2_cdk import Stack, core, identifier
class SampleStack(Stack):
def __init__(self):
super().__init__()
identifier.Password(
stack=self,
user_name='user-0001',
password='password-0001',
)
print(SampleStack().yaml()) # Generate TemplateTwoFactorAuthenticationSetting
Two-factor authentication setting
| Type | Condition | Required | Default | Value Limits | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| status | String Enum enum { “Verifying”, “Enable” } | ✓ | “Verifying” | ~ 128 chars | Status
|
AttachSecurityPolicy
Attached Security Policy
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 1024 chars | User GRN | ||
| securityPolicyIds | List<string> | [] | 0 ~ 100 items | List of GRNs in Security Policy | ||
| attachedAt | long | ✓ | Now | Datetime of creation Unix time, milliseconds Automatically configured on the server | ||
| revision | long | 0 | 0 ~ 9223372036854775805 | Revision |
GetAttr
Generation results of resources that can be obtained with the !GetAttr tag
| Type | Description | |
|---|---|---|
| Items | SecurityPolicy[] | List of security policies newly assigned to users |
Implementation Example
Type: GS2::Identifier::AttachSecurityPolicy
Properties:
UserName: user-0001
SecurityPolicyId: securityPolicyId-0001import (
"github.com/gs2io/gs2-golang-cdk/core"
"github.com/gs2io/gs2-golang-cdk/identifier"
"github.com/openlyinc/pointy"
)
SampleStack := core.NewStack()
identifier.NewAttachSecurityPolicy(
&SampleStack,
"user-0001",
"securityPolicyId-0001",
identifier.AttachSecurityPolicyOptions{},
)
println(SampleStack.Yaml()) // Generate Template
class SampleStack extends \Gs2Cdk\Core\Model\Stack
{
function __construct() {
parent::__construct();
new \Gs2Cdk\Identifier\Model\AttachSecurityPolicy(
stack: $this,
userName: "user-0001",
securityPolicyId: "securityPolicyId-0001"
);
}
}
print((new SampleStack())->yaml()); // Generate Template
class SampleStack extends io.gs2.cdk.core.model.Stack
{
public SampleStack() {
super();
new io.gs2.cdk.identifier.model.AttachSecurityPolicy(
this,
"user-0001",
"securityPolicyId-0001"
);
}
}
System.out.println(new SampleStack().yaml()); // Generate Templatepublic class SampleStack : Gs2Cdk.Core.Model.Stack
{
public SampleStack() {
new Gs2Cdk.Gs2Identifier.Model.AttachSecurityPolicy(
stack: this,
userName: "user-0001",
securityPolicyId: "securityPolicyId-0001"
);
}
}
Debug.Log(new SampleStack().Yaml()); // Generate Templateimport core from "@/gs2cdk/core";
import identifier from "@/gs2cdk/identifier";
class SampleStack extends core.Stack
{
public constructor() {
super();
new identifier.model.AttachSecurityPolicy(
this,
"user-0001",
"securityPolicyId-0001"
);
}
}
console.log(new SampleStack().yaml()); // Generate Template
from gs2_cdk import Stack, core, identifier
class SampleStack(Stack):
def __init__(self):
super().__init__()
identifier.AttachSecurityPolicy(
stack=self,
user_name='user-0001',
security_policy_id='securityPolicyId-0001',
)
print(SampleStack().yaml()) # Generate Template