package awscdkgameliftalpha import ( _init_ "github.com/aws/aws-cdk-go/awscdkgameliftalpha/v2/jsii" _jsii_ "github.com/aws/jsii-runtime-go/runtime" "github.com/aws/aws-cdk-go/awscdk/v2" "github.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch" "github.com/aws/aws-cdk-go/awscdk/v2/awsgamelift" "github.com/aws/aws-cdk-go/awscdk/v2/awsiam" "github.com/aws/aws-cdk-go/awscdkgameliftalpha/v2/internal" "github.com/aws/constructs-go/constructs/v10" ) // Base class for new and imported GameLift fleet. // // Example: // // The code below shows an example of how to instantiate this type. // // The values are placeholders you should change. // import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha" // import "github.com/aws/aws-cdk-go/awscdk" // // var role role // // fleetBase := gamelift_alpha.FleetBase_FromFleetAttributes(this, jsii.String("MyFleetBase"), &FleetAttributes{ // FleetArn: jsii.String("fleetArn"), // FleetId: jsii.String("fleetId"), // Role: role, // }) // // Experimental. type FleetBase interface { awscdk.Resource IFleet // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The ARN of the fleet. // Experimental. FleetArn() *string // The Identifier of the fleet. // Experimental. FleetId() *string // The principal this GameLift fleet is using. // Experimental. GrantPrincipal() awsiam.IPrincipal // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The ARN to put into the destination field of a game session queue. // Experimental. ResourceArnForDestination() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Defines an alias for this fleet. // // ```ts // declare const fleet: gamelift.FleetBase; // // fleet.addAlias('Live'); // // // Is equivalent to // // new gamelift.Alias(this, 'AliasLive', { // aliasName: 'Live', // fleet: fleet, // }); // ```. // Experimental. AddAlias(aliasName *string, options *AliasOptions) Alias // Adds a remote locations to deploy additional instances to and manage as part of the fleet. // Experimental. AddInternalLocation(location *Location) // Adds a remote locations to deploy additional instances to and manage as part of the fleet. // Experimental. AddLocation(region *string, desiredCapacity *float64, minSize *float64, maxSize *float64) // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Grant the `grantee` identity permissions to perform `actions`. // Experimental. Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant // Return the given named metric for this fleet. // Experimental. Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Instances with `ACTIVE` status, which means they are running active server processes. // // The count includes idle instances and those that are hosting one or more game sessions. // This metric measures current total instance capacity. // // This metric can be used with automatic scaling. // Experimental. MetricActiveInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Target number of active instances that GameLift is working to maintain in the fleet. // // With automatic scaling, this value is determined based on the scaling policies currently in force. // Without automatic scaling, this value is set manually. // This metric is not available when viewing data for fleet metric groups. // Experimental. MetricDesiredInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Active instances that are currently hosting zero (0) game sessions. // // This metric measures capacity that is available but unused. // This metric can be used with automatic scaling. // Experimental. MetricIdleInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Number of spot instances that have been interrupted. // Experimental. MetricInstanceInterruptions(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Maximum number of instances that are allowed for the fleet. // // A fleet's instance maximum determines the capacity ceiling during manual or automatic scaling up. // This metric is not available when viewing data for fleet metric groups. // Experimental. MetricMaxInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Minimum number of instances allowed for the fleet. // // A fleet's instance minimum determines the capacity floor during manual or automatic scaling down. // This metric is not available when viewing data for fleet metric groups. // Experimental. MetricMinInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Percentage of all active instances that are idle (calculated as IdleInstances / ActiveInstances). // // This metric can be used for automatic scaling. // Experimental. MetricPercentIdleInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Experimental. ParseLocationCapacity(capacity *LocationCapacity) *awsgamelift.CfnFleet_LocationCapacityProperty // Experimental. ParseLocations() *[]*awsgamelift.CfnFleet_LocationConfigurationProperty // Experimental. ParseResourceCreationLimitPolicy(props *FleetProps) *awsgamelift.CfnFleet_ResourceCreationLimitPolicyProperty // Experimental. ParseRuntimeConfiguration(props *FleetProps) *awsgamelift.CfnFleet_RuntimeConfigurationProperty // Returns a string representation of this construct. // Experimental. ToString() *string // Experimental. WarnVpcPeeringAuthorizations(scope constructs.Construct) } // The jsii proxy struct for FleetBase type jsiiProxy_FleetBase struct { internal.Type__awscdkResource jsiiProxy_IFleet } func (j *jsiiProxy_FleetBase) Env() *awscdk.ResourceEnvironment { var returns *awscdk.ResourceEnvironment _jsii_.Get( j, "env", &returns, ) return returns } func (j *jsiiProxy_FleetBase) FleetArn() *string { var returns *string _jsii_.Get( j, "fleetArn", &returns, ) return returns } func (j *jsiiProxy_FleetBase) FleetId() *string { var returns *string _jsii_.Get( j, "fleetId", &returns, ) return returns } func (j *jsiiProxy_FleetBase) GrantPrincipal() awsiam.IPrincipal { var returns awsiam.IPrincipal _jsii_.Get( j, "grantPrincipal", &returns, ) return returns } func (j *jsiiProxy_FleetBase) Node() constructs.Node { var returns constructs.Node _jsii_.Get( j, "node", &returns, ) return returns } func (j *jsiiProxy_FleetBase) PhysicalName() *string { var returns *string _jsii_.Get( j, "physicalName", &returns, ) return returns } func (j *jsiiProxy_FleetBase) ResourceArnForDestination() *string { var returns *string _jsii_.Get( j, "resourceArnForDestination", &returns, ) return returns } func (j *jsiiProxy_FleetBase) Stack() awscdk.Stack { var returns awscdk.Stack _jsii_.Get( j, "stack", &returns, ) return returns } // Experimental. func NewFleetBase_Override(f FleetBase, scope constructs.Construct, id *string, props *awscdk.ResourceProps) { _init_.Initialize() _jsii_.Create( "@aws-cdk/aws-gamelift-alpha.FleetBase", []interface{}{scope, id, props}, f, ) } // Import an existing fleet from its attributes. // Experimental. func FleetBase_FromFleetAttributes(scope constructs.Construct, id *string, attrs *FleetAttributes) IFleet { _init_.Initialize() if err := validateFleetBase_FromFleetAttributesParameters(scope, id, attrs); err != nil { panic(err) } var returns IFleet _jsii_.StaticInvoke( "@aws-cdk/aws-gamelift-alpha.FleetBase", "fromFleetAttributes", []interface{}{scope, id, attrs}, &returns, ) return returns } // Checks if `x` is a construct. // // Use this method instead of `instanceof` to properly detect `Construct` // instances, even when the construct library is symlinked. // // Explanation: in JavaScript, multiple copies of the `constructs` library on // disk are seen as independent, completely different libraries. As a // consequence, the class `Construct` in each copy of the `constructs` library // is seen as a different class, and an instance of one class will not test as // `instanceof` the other class. `npm install` will not create installations // like this, but users may manually symlink construct libraries together or // use a monorepo tool: in those cases, multiple copies of the `constructs` // library can be accidentally installed, and `instanceof` will behave // unpredictably. It is safest to avoid using `instanceof`, and using // this type-testing method instead. // // Returns: true if `x` is an object created from a class which extends `Construct`. // Experimental. func FleetBase_IsConstruct(x interface{}) *bool { _init_.Initialize() if err := validateFleetBase_IsConstructParameters(x); err != nil { panic(err) } var returns *bool _jsii_.StaticInvoke( "@aws-cdk/aws-gamelift-alpha.FleetBase", "isConstruct", []interface{}{x}, &returns, ) return returns } // Returns true if the construct was created by CDK, and false otherwise. // Experimental. func FleetBase_IsOwnedResource(construct constructs.IConstruct) *bool { _init_.Initialize() if err := validateFleetBase_IsOwnedResourceParameters(construct); err != nil { panic(err) } var returns *bool _jsii_.StaticInvoke( "@aws-cdk/aws-gamelift-alpha.FleetBase", "isOwnedResource", []interface{}{construct}, &returns, ) return returns } // Check whether the given construct is a Resource. // Experimental. func FleetBase_IsResource(construct constructs.IConstruct) *bool { _init_.Initialize() if err := validateFleetBase_IsResourceParameters(construct); err != nil { panic(err) } var returns *bool _jsii_.StaticInvoke( "@aws-cdk/aws-gamelift-alpha.FleetBase", "isResource", []interface{}{construct}, &returns, ) return returns } func (f *jsiiProxy_FleetBase) AddAlias(aliasName *string, options *AliasOptions) Alias { if err := f.validateAddAliasParameters(aliasName, options); err != nil { panic(err) } var returns Alias _jsii_.Invoke( f, "addAlias", []interface{}{aliasName, options}, &returns, ) return returns } func (f *jsiiProxy_FleetBase) AddInternalLocation(location *Location) { if err := f.validateAddInternalLocationParameters(location); err != nil { panic(err) } _jsii_.InvokeVoid( f, "addInternalLocation", []interface{}{location}, ) } func (f *jsiiProxy_FleetBase) AddLocation(region *string, desiredCapacity *float64, minSize *float64, maxSize *float64) { if err := f.validateAddLocationParameters(region); err != nil { panic(err) } _jsii_.InvokeVoid( f, "addLocation", []interface{}{region, desiredCapacity, minSize, maxSize}, ) } func (f *jsiiProxy_FleetBase) ApplyRemovalPolicy(policy awscdk.RemovalPolicy) { if err := f.validateApplyRemovalPolicyParameters(policy); err != nil { panic(err) } _jsii_.InvokeVoid( f, "applyRemovalPolicy", []interface{}{policy}, ) } func (f *jsiiProxy_FleetBase) GeneratePhysicalName() *string { var returns *string _jsii_.Invoke( f, "generatePhysicalName", nil, // no parameters &returns, ) return returns } func (f *jsiiProxy_FleetBase) GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string { if err := f.validateGetResourceArnAttributeParameters(arnAttr, arnComponents); err != nil { panic(err) } var returns *string _jsii_.Invoke( f, "getResourceArnAttribute", []interface{}{arnAttr, arnComponents}, &returns, ) return returns } func (f *jsiiProxy_FleetBase) GetResourceNameAttribute(nameAttr *string) *string { if err := f.validateGetResourceNameAttributeParameters(nameAttr); err != nil { panic(err) } var returns *string _jsii_.Invoke( f, "getResourceNameAttribute", []interface{}{nameAttr}, &returns, ) return returns } func (f *jsiiProxy_FleetBase) Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant { if err := f.validateGrantParameters(grantee); err != nil { panic(err) } args := []interface{}{grantee} for _, a := range actions { args = append(args, a) } var returns awsiam.Grant _jsii_.Invoke( f, "grant", args, &returns, ) return returns } func (f *jsiiProxy_FleetBase) Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric { if err := f.validateMetricParameters(metricName, props); err != nil { panic(err) } var returns awscloudwatch.Metric _jsii_.Invoke( f, "metric", []interface{}{metricName, props}, &returns, ) return returns } func (f *jsiiProxy_FleetBase) MetricActiveInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric { if err := f.validateMetricActiveInstancesParameters(props); err != nil { panic(err) } var returns awscloudwatch.Metric _jsii_.Invoke( f, "metricActiveInstances", []interface{}{props}, &returns, ) return returns } func (f *jsiiProxy_FleetBase) MetricDesiredInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric { if err := f.validateMetricDesiredInstancesParameters(props); err != nil { panic(err) } var returns awscloudwatch.Metric _jsii_.Invoke( f, "metricDesiredInstances", []interface{}{props}, &returns, ) return returns } func (f *jsiiProxy_FleetBase) MetricIdleInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric { if err := f.validateMetricIdleInstancesParameters(props); err != nil { panic(err) } var returns awscloudwatch.Metric _jsii_.Invoke( f, "metricIdleInstances", []interface{}{props}, &returns, ) return returns } func (f *jsiiProxy_FleetBase) MetricInstanceInterruptions(props *awscloudwatch.MetricOptions) awscloudwatch.Metric { if err := f.validateMetricInstanceInterruptionsParameters(props); err != nil { panic(err) } var returns awscloudwatch.Metric _jsii_.Invoke( f, "metricInstanceInterruptions", []interface{}{props}, &returns, ) return returns } func (f *jsiiProxy_FleetBase) MetricMaxInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric { if err := f.validateMetricMaxInstancesParameters(props); err != nil { panic(err) } var returns awscloudwatch.Metric _jsii_.Invoke( f, "metricMaxInstances", []interface{}{props}, &returns, ) return returns } func (f *jsiiProxy_FleetBase) MetricMinInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric { if err := f.validateMetricMinInstancesParameters(props); err != nil { panic(err) } var returns awscloudwatch.Metric _jsii_.Invoke( f, "metricMinInstances", []interface{}{props}, &returns, ) return returns } func (f *jsiiProxy_FleetBase) MetricPercentIdleInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric { if err := f.validateMetricPercentIdleInstancesParameters(props); err != nil { panic(err) } var returns awscloudwatch.Metric _jsii_.Invoke( f, "metricPercentIdleInstances", []interface{}{props}, &returns, ) return returns } func (f *jsiiProxy_FleetBase) ParseLocationCapacity(capacity *LocationCapacity) *awsgamelift.CfnFleet_LocationCapacityProperty { if err := f.validateParseLocationCapacityParameters(capacity); err != nil { panic(err) } var returns *awsgamelift.CfnFleet_LocationCapacityProperty _jsii_.Invoke( f, "parseLocationCapacity", []interface{}{capacity}, &returns, ) return returns } func (f *jsiiProxy_FleetBase) ParseLocations() *[]*awsgamelift.CfnFleet_LocationConfigurationProperty { var returns *[]*awsgamelift.CfnFleet_LocationConfigurationProperty _jsii_.Invoke( f, "parseLocations", nil, // no parameters &returns, ) return returns } func (f *jsiiProxy_FleetBase) ParseResourceCreationLimitPolicy(props *FleetProps) *awsgamelift.CfnFleet_ResourceCreationLimitPolicyProperty { if err := f.validateParseResourceCreationLimitPolicyParameters(props); err != nil { panic(err) } var returns *awsgamelift.CfnFleet_ResourceCreationLimitPolicyProperty _jsii_.Invoke( f, "parseResourceCreationLimitPolicy", []interface{}{props}, &returns, ) return returns } func (f *jsiiProxy_FleetBase) ParseRuntimeConfiguration(props *FleetProps) *awsgamelift.CfnFleet_RuntimeConfigurationProperty { if err := f.validateParseRuntimeConfigurationParameters(props); err != nil { panic(err) } var returns *awsgamelift.CfnFleet_RuntimeConfigurationProperty _jsii_.Invoke( f, "parseRuntimeConfiguration", []interface{}{props}, &returns, ) return returns } func (f *jsiiProxy_FleetBase) ToString() *string { var returns *string _jsii_.Invoke( f, "toString", nil, // no parameters &returns, ) return returns } func (f *jsiiProxy_FleetBase) WarnVpcPeeringAuthorizations(scope constructs.Construct) { if err := f.validateWarnVpcPeeringAuthorizationsParameters(scope); err != nil { panic(err) } _jsii_.InvokeVoid( f, "warnVpcPeeringAuthorizations", []interface{}{scope}, ) }