Class: AWSCDK::ECS::ClusterGrants
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::ECS::ClusterGrants
- Defined in:
- ecs/cluster_grants.rb
Overview
Collection of grant methods for a IClusterRef.
Class Method Summary collapse
-
.from_cluster(resource) ⇒ AWSCDK::ECS::ClusterGrants
Creates grants for ClusterGrants.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#initialize(*args) ⇒ ClusterGrants
constructor
A new instance of ClusterGrants.
- #resource ⇒ AWSCDK::Interfaces::AWSECS::IClusterRef
-
#task_protection(grantee) ⇒ AWSCDK::IAM::Grant
Grants an ECS Task Protection API permission to the specified grantee.
Constructor Details
#initialize(*args) ⇒ ClusterGrants
Returns a new instance of ClusterGrants.
8 9 10 |
# File 'ecs/cluster_grants.rb', line 8 def initialize(*args) raise NoMethodError, "aws-cdk-lib.aws_ecs.ClusterGrants does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.from_cluster(resource) ⇒ AWSCDK::ECS::ClusterGrants
Creates grants for ClusterGrants.
23 24 25 26 |
# File 'ecs/cluster_grants.rb', line 23 def self.from_cluster(resource) Jsii::Type.check_type(resource, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lY3MuSUNsdXN0ZXJSZWYifQ==")), "resource") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ecs.ClusterGrants", "fromCluster", [resource]) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 17 |
# File 'ecs/cluster_grants.rb', line 12 def self.jsii_overridable_methods { :resource => { kind: :property, name: "resource", is_optional: false }, :task_protection => { kind: :method, name: "taskProtection", is_optional: false }, } end |
Instance Method Details
#resource ⇒ AWSCDK::Interfaces::AWSECS::IClusterRef
29 30 31 |
# File 'ecs/cluster_grants.rb', line 29 def resource() jsii_get_property("resource") end |
#task_protection(grantee) ⇒ AWSCDK::IAM::Grant
Grants an ECS Task Protection API permission to the specified grantee.
This method provides a streamlined way to assign the 'ecs:UpdateTaskProtection' permission, enabling the grantee to manage task protection in the ECS cluster.
40 41 42 43 |
# File 'ecs/cluster_grants.rb', line 40 def task_protection(grantee) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") jsii_call_method("taskProtection", [grantee]) end |