1. Docs
  2. Pulumi IaC
  3. Concepts
  4. Functions
  5. Resource methods

Resource methods

    Provider SDKs may also include methods attached to a resource type. These methods return computed values from resources you are managing with Pulumi. For example, in the EKS SDK, the Cluster resource has a .GetKubeconfig method:

    getKubeconfig(args?: Cluster.GetKubeconfigArgs): Output<Cluster.GetKubeconfigResult>
    
    public Output<string> GetKubeconfig(Cluster.GetKubeconfigArgs? args)
    
    func (r *Cluster) GetKubeconfig(ctx *Context, args *ClusterGetKubeconfigArgs) (pulumi.StringOutput, error)
    
    def get_kubeconfig(self,
                       profile_name: Optional[pulumi.Input[str]] = None,
                       role_arn: Optional[pulumi.Input[str]] = None) -> Output[str]
    

    No example available for Java

    No example available for YAML

    Unlike provider functions, methods always appear in the output form: they take Input arguments, and return an Output (because they cannot execute until after the resource has been created). Resource methods do not accept invoke options.

      IDP Builder Course. Register Now.