# 클라우드 계정 관리

## 개요

Panther API는 다음과 같은 클라우드 계정 작업을 지원합니다:

* 클라우드 계정 통합 목록 조회
* 특정 클라우드 계정 통합의 세부 정보 가져오기
* 새 클라우드 계정 통합 생성
* 기존 클라우드 계정 통합 업데이트
* 클라우드 계정 통합 삭제

콘솔의 API 플레이그라운드 또는 GraphQL-over-HTTP API를 사용하여 Panther의 API를 호출할 수 있습니다. 이러한 방법에 대한 자세한 내용은 [Panther API](https://docs.panther.com/ko/panther/api/..#step-1-choose-a-method-for-invoking-the-api).

참조 [클라우드 보안 스캐닝](https://docs.panther.com/ko/cloud-scanning) Panther로 클라우드 리소스 구성을 모니터링하는 방법에 대해 자세히 알아보려면.

## 일반적인 클라우드 계정 작업

아래는 Panther에서 가장 일반적인 GraphQL 클라우드 계정 작업의 일부입니다. 이러한 예시는 GraphQL 클라이언트(또는)를 사용하여 전송해야 하는 문서를 보여줍니다. `curl`)을 사용하여 Panther의 GraphQL API를 호출하기 위해 전송해야 하는 문서를 보여줍니다.

#### 클라우드 계정 목록 조회

```graphql
query cloudAccounts {
  cloudAccounts {
    edges {
      node {
        awsAccountId
        awsRegionIgnoreList
        awsScanConfig {
          auditRole
        }
        awsStackName
        createdAt
        createdBy {
          ... on User {
            id
          }
          ... on APIToken {
            id
          }
        }
        id
        isEditable
        isRealtimeScanningEnabled
        label
        lastModifiedAt
        resourceRegexIgnoreList
        resourceTypeIgnoreList
      }
    }
  }
}

```

#### 클라우드 계정 조회

```graphql
query cloudAccount {
  cloudAccount(id:"CLOUD_ACCOUNT_ID") {
    awsAccountId
    awsRegionIgnoreList
    awsScanConfig {
      auditRole
    }
    awsStackName
    createdAt
    createdBy {
      ... on User {
        id
      }
      ... on APIToken {
        id
      }
    }
    id
    isEditable
    isRealtimeScanningEnabled
    label
    lastModifiedAt
    resourceRegexIgnoreList
    resourceTypeIgnoreList
  }
}

```

#### 클라우드 계정 생성

Panther의 [클라우드 보안 스캐닝](https://docs.panther.com/ko/cloud-scanning) 클라우드 계정을 사용하여 온보딩할 때 자동으로 활성화됩니다 `CreateCloudAccount`. 그러나 여전히 [AWS 계정에서 Panther용 IAM 역할을 생성해야 합니다](https://docs.panther.com/ko/cloud-scanning#creating-an-iam-role-manually-or-with-other-automation).

```graphql
mutation CreateCloudAccount {
  createCloudAccount(input: {
    awsAccountId: "AWS_ACCOUNT_ID"
    awsScanConfig: {
      auditRole: "AUDIT_ROLE"
    }
    label: "new cloud account source"
  }) {
    cloudAccount {
      id
    }
  }
}

```

#### 클라우드 계정 업데이트

```graphql
mutation UpdateCloudAccount {
  updateCloudAccount(
    input: {
      awsRegionIgnoreList: [
        "us-west-1"
      ]
      awsScanConfig: {
        auditRole: "ROLE_ARN"
      }
      id:"CLOUD_ACCOUNT_INTEGRATION_ID"
      label: "some updated label"
      resourceRegexIgnoreList: [".*west-1*"]
      resourceTypeIgnoreList: ["AWS.KMS.Key"]
  }) {
    cloudAccount {
      id
    }
  }
}

```

#### 클라우드 계정 삭제

```graphql
mutation DeleteCloudAccount {
  deleteCloudAccount(input: {id: "CLOUD_ACCOUNT_ID"}) {
    id
  }
}

```
