---
version: 1
interactions:
- request:
    body: '{"id":"54826627-c2b8-4bc1-baa8-ac2a78b02daf", "name":"test-cli-get-policy",
      "organization_id":"951df375-e094-4d26-97c1-ba548eeb9c42", "created_at":"2024-07-30T12:51:07.409843Z",
      "updated_at":"2024-07-30T12:51:07.409843Z", "description":""}'
    form: {}
    headers:
      Content-Type:
      - application/json
      User-Agent:
      - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.22.5; darwin; arm64) cli-e2e-test
    url: https://api.scaleway.com/account/v3/projects
    method: POST
  response:
    body: '{"id":"54826627-c2b8-4bc1-baa8-ac2a78b02daf", "name":"test-cli-get-policy",
      "organization_id":"951df375-e094-4d26-97c1-ba548eeb9c42", "created_at":"2024-07-30T12:51:07.409843Z",
      "updated_at":"2024-07-30T12:51:07.409843Z", "description":""}'
    headers:
      Content-Length:
      - "239"
      Content-Security-Policy:
      - default-src 'none'; frame-ancestors 'none'
      Content-Type:
      - application/json
      Date:
      - Tue, 30 Jul 2024 12:51:07 GMT
      Server:
      - Scaleway API Gateway (fr-par-1;edge02)
      Strict-Transport-Security:
      - max-age=63072000
      X-Content-Type-Options:
      - nosniff
      X-Frame-Options:
      - DENY
      X-Request-Id:
      - f2fb5fa8-f364-4730-9014-2454719d7a6f
    status: 200 OK
    code: 200
    duration: ""
- request:
    body: '{"id":"a0ec7d54-6dc8-46f5-b808-84e1b728fe0a", "name":"test-cli-get-policy",
      "description":"", "organization_id":"951df375-e094-4d26-97c1-ba548eeb9c42",
      "created_at":"2024-07-30T12:51:07.646480Z", "updated_at":"2024-07-30T12:51:07.646480Z",
      "editable":true, "nb_rules":0, "nb_scopes":0, "nb_permission_sets":0, "tags":[],
      "no_principal":true}'
    form: {}
    headers:
      Content-Type:
      - application/json
      User-Agent:
      - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.22.5; darwin; arm64) cli-e2e-test
    url: https://api.scaleway.com/iam/v1alpha1/policies
    method: POST
  response:
    body: '{"id":"a0ec7d54-6dc8-46f5-b808-84e1b728fe0a", "name":"test-cli-get-policy",
      "description":"", "organization_id":"951df375-e094-4d26-97c1-ba548eeb9c42",
      "created_at":"2024-07-30T12:51:07.646480Z", "updated_at":"2024-07-30T12:51:07.646480Z",
      "editable":true, "nb_rules":0, "nb_scopes":0, "nb_permission_sets":0, "tags":[],
      "no_principal":true}'
    headers:
      Content-Length:
      - "341"
      Content-Security-Policy:
      - default-src 'none'; frame-ancestors 'none'
      Content-Type:
      - application/json
      Date:
      - Tue, 30 Jul 2024 12:51:07 GMT
      Server:
      - Scaleway API Gateway (fr-par-1;edge02)
      Strict-Transport-Security:
      - max-age=63072000
      X-Content-Type-Options:
      - nosniff
      X-Frame-Options:
      - DENY
      X-Request-Id:
      - af1da891-ee35-47a9-a948-922e56d5f369
    status: 200 OK
    code: 200
    duration: ""
- request:
    body: '{"id":"a0ec7d54-6dc8-46f5-b808-84e1b728fe0a", "name":"test-cli-get-policy",
      "description":"", "organization_id":"951df375-e094-4d26-97c1-ba548eeb9c42",
      "created_at":"2024-07-30T12:51:07.646480Z", "updated_at":"2024-07-30T12:51:07.646480Z",
      "editable":true, "nb_rules":1, "nb_scopes":1, "nb_permission_sets":1, "tags":[],
      "no_principal":true}'
    form: {}
    headers:
      User-Agent:
      - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.22.5; darwin; arm64) cli-e2e-test
    url: https://api.scaleway.com/iam/v1alpha1/policies/a0ec7d54-6dc8-46f5-b808-84e1b728fe0a
    method: GET
  response:
    body: '{"id":"a0ec7d54-6dc8-46f5-b808-84e1b728fe0a", "name":"test-cli-get-policy",
      "description":"", "organization_id":"951df375-e094-4d26-97c1-ba548eeb9c42",
      "created_at":"2024-07-30T12:51:07.646480Z", "updated_at":"2024-07-30T12:51:07.646480Z",
      "editable":true, "nb_rules":1, "nb_scopes":1, "nb_permission_sets":1, "tags":[],
      "no_principal":true}'
    headers:
      Content-Length:
      - "341"
      Content-Security-Policy:
      - default-src 'none'; frame-ancestors 'none'
      Content-Type:
      - application/json
      Date:
      - Tue, 30 Jul 2024 12:51:07 GMT
      Server:
      - Scaleway API Gateway (fr-par-1;edge02)
      Strict-Transport-Security:
      - max-age=63072000
      X-Content-Type-Options:
      - nosniff
      X-Frame-Options:
      - DENY
      X-Request-Id:
      - 1ccaf473-d33c-41a9-a708-990baabccaca
    status: 200 OK
    code: 200
    duration: ""
- request:
    body: '{"rules":[{"id":"67cce713-1763-446e-8b05-4f520b925131", "permission_set_names":["IPAMReadOnly"],
      "permission_sets_scope_type":"projects", "condition":"", "project_ids":["54826627-c2b8-4bc1-baa8-ac2a78b02daf"]}],
      "total_count":1}'
    form: {}
    headers:
      User-Agent:
      - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.22.5; darwin; arm64) cli-e2e-test
    url: https://api.scaleway.com/iam/v1alpha1/rules?page=1&policy_id=a0ec7d54-6dc8-46f5-b808-84e1b728fe0a
    method: GET
  response:
    body: '{"rules":[{"id":"67cce713-1763-446e-8b05-4f520b925131", "permission_set_names":["IPAMReadOnly"],
      "permission_sets_scope_type":"projects", "condition":"", "project_ids":["54826627-c2b8-4bc1-baa8-ac2a78b02daf"]}],
      "total_count":1}'
    headers:
      Content-Length:
      - "228"
      Content-Security-Policy:
      - default-src 'none'; frame-ancestors 'none'
      Content-Type:
      - application/json
      Date:
      - Tue, 30 Jul 2024 12:51:07 GMT
      Server:
      - Scaleway API Gateway (fr-par-1;edge02)
      Strict-Transport-Security:
      - max-age=63072000
      X-Content-Type-Options:
      - nosniff
      X-Frame-Options:
      - DENY
      X-Request-Id:
      - 6c296124-3676-4802-9d81-f63bd939c9c3
    status: 200 OK
    code: 200
    duration: ""
- request:
    body: ""
    form: {}
    headers:
      User-Agent:
      - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.22.5; darwin; arm64) cli-e2e-test
    url: https://api.scaleway.com/iam/v1alpha1/policies/a0ec7d54-6dc8-46f5-b808-84e1b728fe0a
    method: DELETE
  response:
    body: ""
    headers:
      Content-Security-Policy:
      - default-src 'none'; frame-ancestors 'none'
      Content-Type:
      - application/json
      Date:
      - Tue, 30 Jul 2024 12:51:07 GMT
      Server:
      - Scaleway API Gateway (fr-par-1;edge02)
      Strict-Transport-Security:
      - max-age=63072000
      X-Content-Type-Options:
      - nosniff
      X-Frame-Options:
      - DENY
      X-Request-Id:
      - 7a223418-281f-46f3-9c41-8dca61197d2b
    status: 204 No Content
    code: 204
    duration: ""
- request:
    body: ""
    form: {}
    headers:
      User-Agent:
      - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.22.5; darwin; arm64) cli-e2e-test
    url: https://api.scaleway.com/account/v3/projects/54826627-c2b8-4bc1-baa8-ac2a78b02daf
    method: DELETE
  response:
    body: ""
    headers:
      Content-Security-Policy:
      - default-src 'none'; frame-ancestors 'none'
      Content-Type:
      - application/json
      Date:
      - Tue, 30 Jul 2024 12:51:09 GMT
      Server:
      - Scaleway API Gateway (fr-par-1;edge02)
      Strict-Transport-Security:
      - max-age=63072000
      X-Content-Type-Options:
      - nosniff
      X-Frame-Options:
      - DENY
      X-Request-Id:
      - 4a605efc-7e29-416e-89c6-dfd7c8415f76
    status: 204 No Content
    code: 204
    duration: ""
