Skip to content

Associate Access Policy

eks_associate_access_policy R Documentation

Associates an access policy and its scope to an access entry

Description

Associates an access policy and its scope to an access entry. For more information about associating access policies, see Associating and disassociating access policies to and from access entries in the Amazon EKS User Guide.

Usage

eks_associate_access_policy(clusterName, principalArn, policyArn,
  accessScope)

Arguments

clusterName

[required] The name of your cluster.

principalArn

[required] The Amazon Resource Name (ARN) of the IAM user or role for the AccessEntry that you're associating the access policy to.

policyArn

[required] The ARN of the AccessPolicy that you're associating. For a list of ARNs, use list_access_policies.

accessScope

[required] The scope for the AccessPolicy. You can scope access policies to an entire cluster or to specific Kubernetes namespaces.

Value

A list with the following syntax:

list(
  clusterName = "string",
  principalArn = "string",
  associatedAccessPolicy = list(
    policyArn = "string",
    accessScope = list(
      type = "cluster"|"namespace",
      namespaces = list(
        "string"
      )
    ),
    associatedAt = as.POSIXct(
      "2015-01-01"
    ),
    modifiedAt = as.POSIXct(
      "2015-01-01"
    )
  )
)

Request syntax

svc$associate_access_policy(
  clusterName = "string",
  principalArn = "string",
  policyArn = "string",
  accessScope = list(
    type = "cluster"|"namespace",
    namespaces = list(
      "string"
    )
  )
)