# purestorage-connect/powershellsdk2 architecture

> Architecture diagram of the GitHub repository purestorage-connect/powershellsdk2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-02-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/purestorage-connect/powershellsdk2
- Repository: https://github.com/purestorage-connect/powershellsdk2

## Overview

##### Main Components

a) Client Side:
- PowerShell Environment
- PureStoragePowerShellSDK2 Module
- PowerShell Cmdlets Layer

b) Communication Layer:
- REST API Client
- Authentication/Security Layer

c) Server Side:
- Pure Storage FlashArray
- Purity Operating Environment
- REST API (v2.x and greater)

**[PowerShell Environment]**
- ↓
**[SDK Components]**
- ↓
**[FlashArray Infrastructure]**

##### Detailed Component Breakdown

a) PowerShell Environment (Top Tier):
- Rectangle: PowerShell Console/IDE
- Rounded Rectangle: PureStoragePowerShellSDK2 Module
- Small Rectangles: Individual Cmdlets

b) SDK Components (Middle Tier):
- Hexagon: REST API Client
- Rectangle: Configuration Manager
- Diamond: Error Handling

c) FlashArray Infrastructure (Bottom Tier):
- Rectangle: Purity Operating Environment
- Hexagon: REST API Endpoints

##### Important Elements to Highlight

a) Integration Points:
- PowerShell Gallery Integration
- REST API Version Compatibility
- Authentication Methods

b) Security Layer:
- SSL/TLS Communication
- Credential Management
- Safe Mode Operations

##### Notes Section

References to:
- Documentation Links
- Support Resources
- Example Scripts
- Configuration Files

Remember to include references to the help files (as seen in the file tree: About_Pfa2ReferenceParameters.help.txt, about_Pfa2Configuration.help.txt, etc.) as they represent important configuration and usage aspects of the system.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "PowerShell Environment"
        PS[PowerShell Console/IDE]
        SDK[PureStoragePowerShellSDK2 Module]
        CMD[PowerShell Cmdlets]
    end

    subgraph "SDK Components"
        REST[REST API Client]
        AUTH[Authentication Handler]
        CONF[Configuration Manager]:::config
        ERR[Error Handler]
        SAFE[Safe Mode Operations]:::safe
        FILT[Filtering System]:::filter
        REF[Reference Parameters]:::ref
        DOCS[SDK Documentation]:::docs
        QUICK[Quick Reference]:::quick
        VER[Version Control]:::version
        EX[Example Scripts]:::example
    end

    subgraph "FlashArray Infrastructure"
        FA[(Pure Storage FlashArray)]
        PUR[Purity OS]
        API[REST API v2.x+]
    end

    PS --> SDK
    SDK --> CMD
    CMD --> REST
    REST --> AUTH
    AUTH --> API
    API --> FA
    FA --> PUR

    CONF --> REST
    ERR --> REST
    SAFE --> REST
    FILT --> CMD
    REF --> CMD
    
    classDef config fill:#f9f,stroke:#333
    classDef safe fill:#ff9,stroke:#333
    classDef filter fill:#9ff,stroke:#333
    classDef ref fill:#f99,stroke:#333
    classDef docs fill:#9f9,stroke:#333
    classDef quick fill:#99f,stroke:#333
    classDef version fill:#f9f,stroke:#333
    classDef example fill:#ff9,stroke:#333

    click CONF "https://github.com/Purestorage-Connect/powershellsdk2/blob/main/about_Pfa2Configuration.help.txt"
    click REF "https://github.com/Purestorage-Connect/powershellsdk2/blob/main/About_Pfa2ReferenceParameters.help.txt"
    click FILT "https://github.com/Purestorage-Connect/powershellsdk2/blob/main/about_Pfa2Filtering.help.txt"
    click SAFE "https://github.com/Purestorage-Connect/powershellsdk2/blob/main/about_Pfa2Safemode.help.txt"
    click EX "https://github.com/Purestorage-Connect/powershellsdk2/blob/main/SDK2-Examples.ps1"
    click CONF "https://github.com/Purestorage-Connect/powershellsdk2/blob/main/settings.json"
    click DOCS "https://github.com/Purestorage-Connect/powershellsdk2/blob/main/PureStoragePowerShellSDK2-Help.html"
    click QUICK "https://github.com/Purestorage-Connect/powershellsdk2/blob/main/quick_tips.md"
    click VER "https://github.com/Purestorage-Connect/powershellsdk2/blob/main/release_notes.md"

    subgraph "Legend"
        L1[Component]
        L2[Configuration]:::config
        L3[Safe Mode]:::safe
        L4[Filtering]:::filter
        L5[Reference]:::ref
        L6[Documentation]:::docs
        L7[Quick Reference]:::quick
        L8[Version Control]:::version
        L9[Examples]:::example
    end
```
