nas

Table of Contents

Client

class nas.Client

A low-level client representing NIFCLOUD NAS:

client = session.create_client('nas')

These are the available methods:

authorize_nas_security_group_ingress(**kwargs)

See also: NIFCLOUD API Documentation

Request Syntax

response = client.authorize_nas_security_group_ingress(
    CIDRIP='string',
    NASSecurityGroupName='string',
    SecurityGroupName='string'
)
Parameters:
  • CIDRIP (string) –
  • NASSecurityGroupName (string) –
  • SecurityGroupName (string) –
Return type:

dict

Returns:

Response Syntax

{
    'NASSecurityGroup': {
        'AvailabilityZone': 'string',
        'IPRanges': [
            {
                'CIDRIP': 'string',
                'Status': 'string'
            },
        ],
        'NASSecurityGroupDescription': 'string',
        'NASSecurityGroupName': 'string',
        'OwnerId': 'string',
        'SecurityGroups': [
            {
                'SecurityGroupName': 'string',
                'SecurityGroupOwnerId': 'string',
                'Status': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) –
    • NASSecurityGroup (dict) –
      • AvailabilityZone (string) –
      • IPRanges (list) –
        • (dict) –
          • CIDRIP (string) –
          • Status (string) –
      • NASSecurityGroupDescription (string) –
      • NASSecurityGroupName (string) –
      • OwnerId (string) –
      • SecurityGroups (list) –
        • (dict) –
          • SecurityGroupName (string) –
          • SecurityGroupOwnerId (string) –
          • Status (string) –

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters:operation_name (string) – The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you’d normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns:True if the operation can be paginated, False otherwise.
create_nas_instance(**kwargs)

See also: NIFCLOUD API Documentation

Request Syntax

response = client.create_nas_instance(
    AllocatedStorage=123,
    AvailabilityZone='string',
    MasterPrivateAddress='string',
    MasterUserPassword='string',
    MasterUsername='string',
    NASInstanceDescription='string',
    NASInstanceIdentifier='string',
    NASInstanceType=123,
    NASSecurityGroups=[
        'string',
    ],
    NetworkId='string',
    Protocol='string'
)
Parameters:
  • AllocatedStorage (integer) –
  • AvailabilityZone (string) –
  • MasterPrivateAddress (string) –
  • MasterUserPassword (string) –
  • MasterUsername (string) –
  • NASInstanceDescription (string) –
  • NASInstanceIdentifier (string) –
  • NASInstanceType (integer) –
  • NASSecurityGroups (list) –
    • (string) –
  • NetworkId (string) –
  • Protocol (string) –
Return type:

dict

Returns:

Response Syntax

{
    'NASInstance': {
        'AllocatedStorage': 'string',
        'AuthenticationType': 123,
        'AvailabilityZone': 'string',
        'CreateTime': 'string',
        'DirectoryServiceDomainName': 'string',
        'DomainControllers': [
            {
                'Hostname': 'string',
                'IPAddress': 'string'
            },
        ],
        'Endpoint': {
            'Address': 'string',
            'PrivateAddress': 'string'
        },
        'MasterUsername': 'string',
        'NASInstanceClass': 'string',
        'NASInstanceDescription': 'string',
        'NASInstanceErrorInfo': {
            'NASInstanceErrorCode': 'string',
            'NASInstanceErrorMessage': 'string'
        },
        'NASInstanceIdentifier': 'string',
        'NASInstanceStatus': 'string',
        'NASInstanceType': 123,
        'NASSecurityGroups': [
            {
                'AvailabilityZone': 'string',
                'IPRanges': [
                    {
                        'CIDRIP': 'string',
                        'Status': 'string'
                    },
                ],
                'NASSecurityGroupDescription': 'string',
                'NASSecurityGroupName': 'string',
                'OwnerId': 'string',
                'SecurityGroups': [
                    {
                        'SecurityGroupName': 'string',
                        'SecurityGroupOwnerId': 'string',
                        'Status': 'string'
                    },
                ]
            },
        ],
        'NetworkId': 'string',
        'NoRootSquash': 'string',
        'Protocol': 'string',
        'StorageType': 123
    }
}

Response Structure

  • (dict) –
    • NASInstance (dict) –
      • AllocatedStorage (string) –
      • AuthenticationType (integer) –
      • AvailabilityZone (string) –
      • CreateTime (string) –
      • DirectoryServiceDomainName (string) –
      • DomainControllers (list) –
        • (dict) –
          • Hostname (string) –
          • IPAddress (string) –
      • Endpoint (dict) –
        • Address (string) –
        • PrivateAddress (string) –
      • MasterUsername (string) –
      • NASInstanceClass (string) –
      • NASInstanceDescription (string) –
      • NASInstanceErrorInfo (dict) –
        • NASInstanceErrorCode (string) –
        • NASInstanceErrorMessage (string) –
      • NASInstanceIdentifier (string) –
      • NASInstanceStatus (string) –
      • NASInstanceType (integer) –
      • NASSecurityGroups (list) –
        • (dict) –
          • AvailabilityZone (string) –
          • IPRanges (list) –
            • (dict) –
              • CIDRIP (string) –
              • Status (string) –
          • NASSecurityGroupDescription (string) –
          • NASSecurityGroupName (string) –
          • OwnerId (string) –
          • SecurityGroups (list) –
            • (dict) –
              • SecurityGroupName (string) –
              • SecurityGroupOwnerId (string) –
              • Status (string) –
      • NetworkId (string) –
      • NoRootSquash (string) –
      • Protocol (string) –
      • StorageType (integer) –

create_nas_security_group(**kwargs)

See also: NIFCLOUD API Documentation

Request Syntax

response = client.create_nas_security_group(
    AvailabilityZone='string',
    NASSecurityGroupDescription='string',
    NASSecurityGroupName='string'
)
Parameters:
  • AvailabilityZone (string) –
  • NASSecurityGroupDescription (string) –
  • NASSecurityGroupName (string) –
Return type:

dict

Returns:

Response Syntax

{
    'NASSecurityGroup': {
        'AvailabilityZone': 'string',
        'IPRanges': [
            {
                'CIDRIP': 'string',
                'Status': 'string'
            },
        ],
        'NASSecurityGroupDescription': 'string',
        'NASSecurityGroupName': 'string',
        'OwnerId': 'string',
        'SecurityGroups': [
            {
                'SecurityGroupName': 'string',
                'SecurityGroupOwnerId': 'string',
                'Status': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) –
    • NASSecurityGroup (dict) –
      • AvailabilityZone (string) –
      • IPRanges (list) –
        • (dict) –
          • CIDRIP (string) –
          • Status (string) –
      • NASSecurityGroupDescription (string) –
      • NASSecurityGroupName (string) –
      • OwnerId (string) –
      • SecurityGroups (list) –
        • (dict) –
          • SecurityGroupName (string) –
          • SecurityGroupOwnerId (string) –
          • Status (string) –

delete_nas_instance(**kwargs)

See also: NIFCLOUD API Documentation

Request Syntax

response = client.delete_nas_instance(
    DirectoryServiceAdministratorName='string',
    DirectoryServiceAdministratorPassword='string',
    NASInstanceIdentifier='string'
)
Parameters:
  • DirectoryServiceAdministratorName (string) –
  • DirectoryServiceAdministratorPassword (string) –
  • NASInstanceIdentifier (string) –
Return type:

dict

Returns:

Response Syntax

{
    'NASInstance': {
        'AllocatedStorage': 'string',
        'AuthenticationType': 123,
        'AvailabilityZone': 'string',
        'CreateTime': 'string',
        'DirectoryServiceDomainName': 'string',
        'DomainControllers': [
            {
                'Hostname': 'string',
                'IPAddress': 'string'
            },
        ],
        'Endpoint': {
            'Address': 'string',
            'PrivateAddress': 'string'
        },
        'MasterUsername': 'string',
        'NASInstanceClass': 'string',
        'NASInstanceDescription': 'string',
        'NASInstanceErrorInfo': {
            'NASInstanceErrorCode': 'string',
            'NASInstanceErrorMessage': 'string'
        },
        'NASInstanceIdentifier': 'string',
        'NASInstanceStatus': 'string',
        'NASInstanceType': 123,
        'NASSecurityGroups': [
            {
                'AvailabilityZone': 'string',
                'IPRanges': [
                    {
                        'CIDRIP': 'string',
                        'Status': 'string'
                    },
                ],
                'NASSecurityGroupDescription': 'string',
                'NASSecurityGroupName': 'string',
                'OwnerId': 'string',
                'SecurityGroups': [
                    {
                        'SecurityGroupName': 'string',
                        'SecurityGroupOwnerId': 'string',
                        'Status': 'string'
                    },
                ]
            },
        ],
        'NetworkId': 'string',
        'NoRootSquash': 'string',
        'Protocol': 'string',
        'StorageType': 123
    }
}

Response Structure

  • (dict) –
    • NASInstance (dict) –
      • AllocatedStorage (string) –
      • AuthenticationType (integer) –
      • AvailabilityZone (string) –
      • CreateTime (string) –
      • DirectoryServiceDomainName (string) –
      • DomainControllers (list) –
        • (dict) –
          • Hostname (string) –
          • IPAddress (string) –
      • Endpoint (dict) –
        • Address (string) –
        • PrivateAddress (string) –
      • MasterUsername (string) –
      • NASInstanceClass (string) –
      • NASInstanceDescription (string) –
      • NASInstanceErrorInfo (dict) –
        • NASInstanceErrorCode (string) –
        • NASInstanceErrorMessage (string) –
      • NASInstanceIdentifier (string) –
      • NASInstanceStatus (string) –
      • NASInstanceType (integer) –
      • NASSecurityGroups (list) –
        • (dict) –
          • AvailabilityZone (string) –
          • IPRanges (list) –
            • (dict) –
              • CIDRIP (string) –
              • Status (string) –
          • NASSecurityGroupDescription (string) –
          • NASSecurityGroupName (string) –
          • OwnerId (string) –
          • SecurityGroups (list) –
            • (dict) –
              • SecurityGroupName (string) –
              • SecurityGroupOwnerId (string) –
              • Status (string) –
      • NetworkId (string) –
      • NoRootSquash (string) –
      • Protocol (string) –
      • StorageType (integer) –

delete_nas_security_group(**kwargs)

See also: NIFCLOUD API Documentation

Request Syntax

response = client.delete_nas_security_group(
    NASSecurityGroupName='string'
)
Parameters:NASSecurityGroupName (string) –
Returns:None
describe_nas_instances(**kwargs)

See also: NIFCLOUD API Documentation

Request Syntax

response = client.describe_nas_instances(
    NASInstanceIdentifier='string'
)
Parameters:NASInstanceIdentifier (string) –
Return type:dict
Returns:Response Syntax
{
    'NASInstances': [
        {
            'AllocatedStorage': 'string',
            'AuthenticationType': 123,
            'AvailabilityZone': 'string',
            'CreateTime': 'string',
            'DirectoryServiceDomainName': 'string',
            'DomainControllers': [
                {
                    'Hostname': 'string',
                    'IPAddress': 'string'
                },
            ],
            'Endpoint': {
                'Address': 'string',
                'PrivateAddress': 'string'
            },
            'MasterUsername': 'string',
            'NASInstanceClass': 'string',
            'NASInstanceDescription': 'string',
            'NASInstanceErrorInfo': {
                'NASInstanceErrorCode': 'string',
                'NASInstanceErrorMessage': 'string'
            },
            'NASInstanceIdentifier': 'string',
            'NASInstanceStatus': 'string',
            'NASInstanceType': 123,
            'NASSecurityGroups': [
                {
                    'AvailabilityZone': 'string',
                    'IPRanges': [
                        {
                            'CIDRIP': 'string',
                            'Status': 'string'
                        },
                    ],
                    'NASSecurityGroupDescription': 'string',
                    'NASSecurityGroupName': 'string',
                    'OwnerId': 'string',
                    'SecurityGroups': [
                        {
                            'SecurityGroupName': 'string',
                            'SecurityGroupOwnerId': 'string',
                            'Status': 'string'
                        },
                    ]
                },
            ],
            'NetworkId': 'string',
            'NoRootSquash': 'string',
            'Protocol': 'string',
            'StorageType': 123
        },
    ]
}

Response Structure

  • (dict) –
    • NASInstances (list) –
      • (dict) –
        • AllocatedStorage (string) –
        • AuthenticationType (integer) –
        • AvailabilityZone (string) –
        • CreateTime (string) –
        • DirectoryServiceDomainName (string) –
        • DomainControllers (list) –
          • (dict) –
            • Hostname (string) –
            • IPAddress (string) –
        • Endpoint (dict) –
          • Address (string) –
          • PrivateAddress (string) –
        • MasterUsername (string) –
        • NASInstanceClass (string) –
        • NASInstanceDescription (string) –
        • NASInstanceErrorInfo (dict) –
          • NASInstanceErrorCode (string) –
          • NASInstanceErrorMessage (string) –
        • NASInstanceIdentifier (string) –
        • NASInstanceStatus (string) –
        • NASInstanceType (integer) –
        • NASSecurityGroups (list) –
          • (dict) –
            • AvailabilityZone (string) –
            • IPRanges (list) –
              • (dict) –
                • CIDRIP (string) –
                • Status (string) –
            • NASSecurityGroupDescription (string) –
            • NASSecurityGroupName (string) –
            • OwnerId (string) –
            • SecurityGroups (list) –
              • (dict) –
                • SecurityGroupName (string) –
                • SecurityGroupOwnerId (string) –
                • Status (string) –
        • NetworkId (string) –
        • NoRootSquash (string) –
        • Protocol (string) –
        • StorageType (integer) –
describe_nas_security_groups(**kwargs)

See also: NIFCLOUD API Documentation

Request Syntax

response = client.describe_nas_security_groups(
    NASSecurityGroupName='string'
)
Parameters:NASSecurityGroupName (string) –
Return type:dict
Returns:Response Syntax
{
    'NASSecurityGroups': [
        {
            'AvailabilityZone': 'string',
            'IPRanges': [
                {
                    'CIDRIP': 'string',
                    'Status': 'string'
                },
            ],
            'NASSecurityGroupDescription': 'string',
            'NASSecurityGroupName': 'string',
            'OwnerId': 'string',
            'SecurityGroups': [
                {
                    'SecurityGroupName': 'string',
                    'SecurityGroupOwnerId': 'string',
                    'Status': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) –
    • NASSecurityGroups (list) –
      • (dict) –
        • AvailabilityZone (string) –
        • IPRanges (list) –
          • (dict) –
            • CIDRIP (string) –
            • Status (string) –
        • NASSecurityGroupDescription (string) –
        • NASSecurityGroupName (string) –
        • OwnerId (string) –
        • SecurityGroups (list) –
          • (dict) –
            • SecurityGroupName (string) –
            • SecurityGroupOwnerId (string) –
            • Status (string) –
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters:
  • ClientMethod (string) – The client method to presign for
  • Params (dict) – The parameters normally passed to ClientMethod.
  • ExpiresIn (int) – The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
  • HttpMethod (string) – The http method to use on the generated url. By default, the http method is whatever is used in the method’s model.
Returns:

The presigned url

get_metric_statistics(**kwargs)

See also: NIFCLOUD API Documentation

Request Syntax

response = client.get_metric_statistics(
    Dimensions=[
        {
            'Name': 'string',
            'Value': 'string'
        },
    ],
    EndTime=datetime(2015, 1, 1),
    MetricName='string',
    StartTime=datetime(2015, 1, 1)
)
Parameters:
  • Dimensions (list) –
    • (dict) –
      • Name (string) –
      • Value (string) –
  • EndTime (datetime) –
  • MetricName (string) –
  • StartTime (datetime) –
Return type:

dict

Returns:

Response Syntax

{
    'Datapoints': [
        {
            'SampleCount': 'string',
            'Sum': 'string',
            'TargetName': 'string',
            'Timestamp': 'string'
        },
    ],
    'Label': 'string'
}

Response Structure

  • (dict) –
    • Datapoints (list) –
      • (dict) –
        • SampleCount (string) –
        • Sum (string) –
        • TargetName (string) –
        • Timestamp (string) –
    • Label (string) –

get_paginator(operation_name)

Create a paginator for an operation.

Parameters:operation_name (string) – The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you’d normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises:OperationNotPageableError – Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type:L{botocore.paginate.Paginator}
Returns:A paginator object.
get_waiter(waiter_name)
modify_nas_instance(**kwargs)

See also: NIFCLOUD API Documentation

Request Syntax

response = client.modify_nas_instance(
    AllocatedStorage=123,
    AuthenticationType=123,
    DirectoryServiceAdministratorName='string',
    DirectoryServiceAdministratorPassword='string',
    DirectoryServiceDomainName='string',
    DomainControllers=[
        {
            'Hostname': 'string',
            'IPAddress': 'string'
        },
    ],
    MasterPrivateAddress='string',
    MasterUserPassword='string',
    NASInstanceDescription='string',
    NASInstanceIdentifier='string',
    NASSecurityGroups=[
        'string',
    ],
    NetworkId='string',
    NewNASInstanceIdentifier='string'
)
Parameters:
  • AllocatedStorage (integer) –
  • AuthenticationType (integer) –
  • DirectoryServiceAdministratorName (string) –
  • DirectoryServiceAdministratorPassword (string) –
  • DirectoryServiceDomainName (string) –
  • DomainControllers (list) –
    • (dict) –
      • Hostname (string) –
      • IPAddress (string) –
  • MasterPrivateAddress (string) –
  • MasterUserPassword (string) –
  • NASInstanceDescription (string) –
  • NASInstanceIdentifier (string) –
  • NASSecurityGroups (list) –
    • (string) –
  • NetworkId (string) –
  • NewNASInstanceIdentifier (string) –
Return type:

dict

Returns:

Response Syntax

{
    'NASInstance': {
        'AllocatedStorage': 'string',
        'AuthenticationType': 123,
        'AvailabilityZone': 'string',
        'CreateTime': 'string',
        'DirectoryServiceDomainName': 'string',
        'DomainControllers': [
            {
                'Hostname': 'string',
                'IPAddress': 'string'
            },
        ],
        'Endpoint': {
            'Address': 'string',
            'PrivateAddress': 'string'
        },
        'MasterUsername': 'string',
        'NASInstanceClass': 'string',
        'NASInstanceDescription': 'string',
        'NASInstanceErrorInfo': {
            'NASInstanceErrorCode': 'string',
            'NASInstanceErrorMessage': 'string'
        },
        'NASInstanceIdentifier': 'string',
        'NASInstanceStatus': 'string',
        'NASInstanceType': 123,
        'NASSecurityGroups': [
            {
                'AvailabilityZone': 'string',
                'IPRanges': [
                    {
                        'CIDRIP': 'string',
                        'Status': 'string'
                    },
                ],
                'NASSecurityGroupDescription': 'string',
                'NASSecurityGroupName': 'string',
                'OwnerId': 'string',
                'SecurityGroups': [
                    {
                        'SecurityGroupName': 'string',
                        'SecurityGroupOwnerId': 'string',
                        'Status': 'string'
                    },
                ]
            },
        ],
        'NetworkId': 'string',
        'NoRootSquash': 'string',
        'Protocol': 'string',
        'StorageType': 123
    }
}

Response Structure

  • (dict) –
    • NASInstance (dict) –
      • AllocatedStorage (string) –
      • AuthenticationType (integer) –
      • AvailabilityZone (string) –
      • CreateTime (string) –
      • DirectoryServiceDomainName (string) –
      • DomainControllers (list) –
        • (dict) –
          • Hostname (string) –
          • IPAddress (string) –
      • Endpoint (dict) –
        • Address (string) –
        • PrivateAddress (string) –
      • MasterUsername (string) –
      • NASInstanceClass (string) –
      • NASInstanceDescription (string) –
      • NASInstanceErrorInfo (dict) –
        • NASInstanceErrorCode (string) –
        • NASInstanceErrorMessage (string) –
      • NASInstanceIdentifier (string) –
      • NASInstanceStatus (string) –
      • NASInstanceType (integer) –
      • NASSecurityGroups (list) –
        • (dict) –
          • AvailabilityZone (string) –
          • IPRanges (list) –
            • (dict) –
              • CIDRIP (string) –
              • Status (string) –
          • NASSecurityGroupDescription (string) –
          • NASSecurityGroupName (string) –
          • OwnerId (string) –
          • SecurityGroups (list) –
            • (dict) –
              • SecurityGroupName (string) –
              • SecurityGroupOwnerId (string) –
              • Status (string) –
      • NetworkId (string) –
      • NoRootSquash (string) –
      • Protocol (string) –
      • StorageType (integer) –

modify_nas_security_group(**kwargs)

See also: NIFCLOUD API Documentation

Request Syntax

response = client.modify_nas_security_group(
    NASSecurityGroupDescription='string',
    NASSecurityGroupName='string',
    NewNASSecurityGroupName='string'
)
Parameters:
  • NASSecurityGroupDescription (string) –
  • NASSecurityGroupName (string) –
  • NewNASSecurityGroupName (string) –
Return type:

dict

Returns:

Response Syntax

{
    'NASSecurityGroup': {
        'AvailabilityZone': 'string',
        'IPRanges': [
            {
                'CIDRIP': 'string',
                'Status': 'string'
            },
        ],
        'NASSecurityGroupDescription': 'string',
        'NASSecurityGroupName': 'string',
        'OwnerId': 'string',
        'SecurityGroups': [
            {
                'SecurityGroupName': 'string',
                'SecurityGroupOwnerId': 'string',
                'Status': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) –
    • NASSecurityGroup (dict) –
      • AvailabilityZone (string) –
      • IPRanges (list) –
        • (dict) –
          • CIDRIP (string) –
          • Status (string) –
      • NASSecurityGroupDescription (string) –
      • NASSecurityGroupName (string) –
      • OwnerId (string) –
      • SecurityGroups (list) –
        • (dict) –
          • SecurityGroupName (string) –
          • SecurityGroupOwnerId (string) –
          • Status (string) –

revoke_nas_security_group_ingress(**kwargs)

See also: NIFCLOUD API Documentation

Request Syntax

response = client.revoke_nas_security_group_ingress(
    CIDRIP='string',
    NASSecurityGroupName='string',
    SecurityGroupName='string'
)
Parameters:
  • CIDRIP (string) –
  • NASSecurityGroupName (string) –
  • SecurityGroupName (string) –
Return type:

dict

Returns:

Response Syntax

{
    'NASSecurityGroup': {
        'AvailabilityZone': 'string',
        'IPRanges': [
            {
                'CIDRIP': 'string',
                'Status': 'string'
            },
        ],
        'NASSecurityGroupDescription': 'string',
        'NASSecurityGroupName': 'string',
        'OwnerId': 'string',
        'SecurityGroups': [
            {
                'SecurityGroupName': 'string',
                'SecurityGroupOwnerId': 'string',
                'Status': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) –
    • NASSecurityGroup (dict) –
      • AvailabilityZone (string) –
      • IPRanges (list) –
        • (dict) –
          • CIDRIP (string) –
          • Status (string) –
      • NASSecurityGroupDescription (string) –
      • NASSecurityGroupName (string) –
      • OwnerId (string) –
      • SecurityGroups (list) –
        • (dict) –
          • SecurityGroupName (string) –
          • SecurityGroupOwnerId (string) –
          • Status (string) –